LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   cannot upload data using scp, Read-only file system (https://www.linuxquestions.org/questions/linux-newbie-8/cannot-upload-data-using-scp-read-only-file-system-665614/)

ufmale 08-26-2008 05:28 PM

cannot upload data using scp, Read-only file system
 
I am trying to upload data to a server to the be user dir (using be account, be@xxx), but got a "Read-only file system" error.

Checking the server, i see that the permission is changed. I don't remember changing them.. not sure what happened. Try to login as root and change the permission to 777 with -R, but it did not work,


Quote:

drwx------ 19 be be 4096 Aug 8 11:22 be
drwx------ 9 db db 4096 Jul 29 19:37 db
drwx------ 27 am am 4096 Jul 21 13:13 am
Does anyone have any idea what might have happen? It used to work!

matthewg42 08-26-2008 06:03 PM

The permissions on those directories are such that their owners can write into them. The "readonly filesystem" message probably means the whole filesystem has flipped into readonly mode. This can happen if errors are detected on the drive. Check the system logs to see if there is any message about readonly.

You might need to repair the filesystem, and possibly replace the disk if it is going bad.

ufmale 08-26-2008 11:31 PM

I grep the /var/log/ directory for the readonly, and got following messages, not sure what it mean

Quote:

messages.5:Jul 15 15:21:22 ee100 gconfd (euser-6230): Resolved address "xml:rea
donly:/home/euser/.gconf.xml.defaults" to a read-only configuration source at po
sition 3
messages.5:Jul 15 15:21:22 ee100 gconfd (euser-6230): Resolved address "xml:rea
donly:/etc/gconf/gconf.xml.defaults" to a read-only configuration source at posi
tion 4
messages.5:Jul 15 15:21:34 ee100 gconfd (root-6398): Resolved address "xml:read
only:/etc/gconf/gconf.xml.mandatory" to a read-only configuration source at posi
tion 0
messages.5:Jul 15 15:21:34 ee100 gconfd (root-6398): Resolved address "xml:read
only:/etc/gconf/gconf.xml.defaults" to a read-only configuration source at posit
ion 2
How do I check the filesystem if there is any problem? or even repaire it?
The disk is formated with ext3 fs.

matthewg42 08-26-2008 11:46 PM

Find out what device the drive is, e.g. this in a terminal
Code:

$ cd /the/directory/you/could/not/write/to
$ mount |grep $(df -k . |tail -1 |awk '{ print $NF }')

You should see something like this:
Code:

/dev/sda5 on /home type ext3 (ro)
If the "(ro)" at the end is not there, or there is something else, like "(rw)", then maybe the filesystem is not mounted read only. In any case, paste the output here so I can see what is going on.
If it is mounted read only (i.e. you see the ro at the end of the line), grep for the device name in the log directory. In my case that would be done with the command:
Code:

grep sda5 /var/log/*


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