Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 05-26-2005, 03:07 PM   #1
LQ Newbie
Registered: May 2005
Posts: 23

Rep: Reputation: 15
apache2.conf read-only?


A few days ago I installed Apache2 on my Debian Sarge system. I was able to edit /etc/apache2/apache2.conf and httpd.conf with no problem.

But when I went into apache2.conf today to change ServerName, the system told me that the file was "read-only." Same when tried to edit httpd.conf.

What ignorant thing have I done now and how can I correct it?

Many thanks,

Old 05-26-2005, 04:30 PM   #2
Senior Member
Registered: Oct 2004
Location: Athens, Greece
Distribution: Slackware, arch
Posts: 1,783

Rep: Reputation: 52
When you are trying to edit the file, are you root?
Normal users should not be allowed to edit configuration files.

ls -l /etc/apache2/apache2.conf
to see the file permissions. (the -l is a small L not a 1)
Old 05-26-2005, 04:33 PM   #3
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,567

Rep: Reputation: 164Reputation: 164
To change the file you need to be root. Use 'su' (with root password when it asks you) and then open it in an editor.
Old 05-26-2005, 05:24 PM   #4
LQ Newbie
Registered: May 2005
Posts: 23

Original Poster
Rep: Reputation: 15
Many thanks, all.

I thought I was in root, but evidently wasn't. It's been a long day. Problem solved.

All the best,

Old 05-26-2005, 10:06 PM   #5
LQ Newbie
Registered: May 2005
Distribution: Ubuntu
Posts: 3

Rep: Reputation: 0
Problem Solved!

Thank you all for the suggestions. It turns out it was a PHP/Mysql issue. After browsing about a million other forums, I came across one Here
that mentioned uncommenting a line in my /etc/php4/apache2/php.ini file. This is the line.

I don't know if this is the best way to solve it, but it worked for me.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
apache2 complains 'sysconfig.d/include.conf' not found tacca Linux - Software 1 03-24-2011 09:23 AM
Example share in smb.conf doesn't work - read/write vs read only kleptophobiac Linux - Networking 0 09-01-2004 07:14 PM
Allow apache2 to read from mounted device suit4 Linux - Software 3 02-16-2004 09:06 AM
saving changes to apache2/conf/httpd.conf file Zaius Linux - Newbie 6 01-09-2004 11:45 PM
lilo.conf and grub.conf no read access shanenin Linux - Software 1 10-02-2003 03:53 PM

All times are GMT -5. The time now is 05:45 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration