LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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


Reply
  Search this Thread
Old 05-16-2012, 11:33 AM   #1
|nexus|
LQ Newbie
 
Registered: May 2012
Posts: 8

Rep: Reputation: Disabled
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.
 
Old 05-16-2012, 11:59 AM   #2
es0teric
Member
 
Registered: Apr 2007
Distribution: Ubuntu
Posts: 105

Rep: Reputation: 19
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.
 
Old 05-16-2012, 12:07 PM   #3
|nexus|
LQ Newbie
 
Registered: May 2012
Posts: 8

Original Poster
Rep: Reputation: Disabled
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.
 
Old 05-16-2012, 12:48 PM   #4
|nexus|
LQ Newbie
 
Registered: May 2012
Posts: 8

Original Poster
Rep: Reputation: Disabled
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.
 
  


Reply



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
Read-only file system - ERROR ramecare Linux - Server 5 02-08-2012 11:22 AM
Error: Read-only file system linuxseek Linux - Mobile 2 11-06-2009 09:08 AM
read-only file system error when editing a config file smallfrowne Linux - Newbie 5 02-19-2008 06:06 PM
Read only file system error! xardas Linux - Desktop 1 05-14-2007 10:18 PM
read only file system error surfduke Linux - General 3 09-30-2005 07:04 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:12 AM.

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