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! |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
05-16-2012, 11:33 AM
|
#1
|
LQ Newbie
Registered: May 2012
Posts: 8
Rep: 
|
Error Read-only file system
Hello,
Every time I try to save a index.php file I get the following error..
[ Error writing /var/www/index.php: Read-only file system ]
Any help would be greatly appreciated.
|
|
|
05-16-2012, 11:59 AM
|
#2
|
Member
Registered: Apr 2007
Distribution: Ubuntu
Posts: 105
Rep:
|
The filesystem that file is stored on is mounted read-only, which means you won't be able to modify anything on it. Pasting output of the mount command would be helpful.
If this used to work but now doesn't, then perhaps the disk is having problems. Sometimes if errors are detected on a disk, Linux will mount the filesystem read-only.
|
|
|
05-16-2012, 12:07 PM
|
#3
|
LQ Newbie
Registered: May 2012
Posts: 8
Original Poster
Rep: 
|
I typed "mount" at the terminal and the following output..
Code:
/dev/sda1 on / type ext4 (rw,errors=remount-ro)
proc on /proc type proc (rw,noexec,nosuid,nodev)
none on /sys type sysfs (rw,noexec,nosuid,nodev)
none on /sys/fs/fuse/connections type fusectl (rw)
none on /sys/kernel/debug type debugfs (rw)
none on /sys/kernel/security type securityfs (rw)
none on /dev type devtmpfs (rw,mode=0755)
none on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
none on /dev/shm type tmpfs (rw,nosuid,nodev)
none on /var/run type tmpfs (rw,nosuid,mode=0755)
none on /var/lock type tmpfs (rw,noexec,nosuid,nodev)
none on /lib/init/rw type tmpfs (rw,nosuid,mode=0755)
none on /var/lib/ureadahead/debugfs type debugfs (rw,relatime)
/dev/sda6 on /DATA type ext4 (rw)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev)
mount: warning: /etc/mtab is not writable (e.g. read-only filesystem).
It's possible that information reported by mount(8) is not
up to date. For actual information about system mount points
check the /proc/mounts file.
|
|
|
05-16-2012, 12:48 PM
|
#4
|
LQ Newbie
Registered: May 2012
Posts: 8
Original Poster
Rep: 
|
Thanks for your help :]
You were correct about the damaged filesystem causing a read-only error.
I decided to do a e2fsck -p -f, a few blocks were off and did a reboot and everything is okay now.
|
|
|
All times are GMT -5. The time now is 05:14 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|