heamon

Registered
Dec 11, 2006
3
0
151
I have bought the whm, but now, I want to modify "httpd.conf" add application/http .html
but when I login with ssh, the file httpd.conf can't be modified, it says permition defined

Can you help me ,tell me how can i change the httpd.conf , and can i use cpanel to change it ,and how to do?

thank you!
 

markfrompf

Well-Known Member
Mar 27, 2006
174
0
166
Los Angeles, CA
You should be able to mod the file in SSH. Make sure you're logging in as "root."

If you are logged in as "root" and are still having problems, there is a serious issue.

If you don't have root access, make sure you have full ssh access with no restrictions.

You should be able to use pico and edit it.
 

heamon

Registered
Dec 11, 2006
3
0
151
the problem is also

I have the root , but the problem is still, how should I do?

Is ssh's problem?
 

tweakservers

Well-Known Member
Mar 30, 2006
379
0
166
the httpd.conf might only have the read only read attribute, try running the following command as root to see if it helps:

chattr -i httpd.conf

after that edit and save the file
 

heamon

Registered
Dec 11, 2006
3
0
151
I Have Do That ,But Wrong!

I Have Do That , But The Wrong Is "chattr: Permission denied while reading flags on httpd.conf
"

Why?
 

Spiral

BANNED
Jun 24, 2005
2,018
8
193
What do you see when you type "whoami"?

If you are not connected as "root" then that is your problem.

The fact that you can't edit httpd.conf and you don't have permission
to use the chattr command on httpd.conf makes me suspect that you
are not actually logged in as root but rather some other user.

Now, you said something else that puzzles me ....
I want to modify "httpd.conf" add application/http .html
Why in the world would you be trying to add a line that is already in the httpd.conf file?
 

k1k

Active Member
Mar 24, 2006
27
0
151
The htpd.conf

You should use ssh connection and login as root user to your server. Then you can use any text editor in order to modify your httpd.config file (vi,vim,pico,nano,mcedit...).
And the chattr command... It will work only if your filesystem is ext3. If you are using reiserfs - then you wont be able to set chattr flags.
So here is one simple example if you want to be sure that everything is ok with your file permissions.


cp -ar /usr/local/apache/conf/httpd.conf /usr/local/apache/conf/httpd.conf.1
rm -rf /usr/local/apache/conf/httpd.conf
cp -ar /usr/local/apache/conf/httpd.conf.1 /usr/local/apache/conf/httpd.conf

If you have no errors then you will be able to edit your config also ...