I have a partition mounted from /dev/sda3 to /foo. It appears that it is not writable. I cannot change this with "chmod /foo 777", so how I can do this?

link|improve this question

50% accept rate
1  
Can you post the result from mount? – Bart De Vos Aug 17 '11 at 14:32
There was no result. "sudo mount /dev/sda3 /foo" just went to the next line. No output. – coffee Aug 17 '11 at 14:51
Was the partition mounted read-write, then suddenly changed to read-only? In that case see mailq's comment to my answer. – Eduardo Ivanec Aug 17 '11 at 14:52
@coffee - he/she was referring to running mount by itself. No parameters. – Eduardo Ivanec Aug 17 '11 at 14:52
Pasting the line I'm assuming you want from "mount": "/dev/sda3 on /foo type ext3 (rw)" – coffee Aug 17 '11 at 15:03
feedback

1 Answer

Try this: mount -o remount,rw /foo.

Edit: by your comment I see this hasn't got anything to do with the partition being mounted read-only. Just run the chmod with sudo, in case you weren't doing that already. Failing that try adding 'defaults' to the mount options first. Remember to edit /etc/fstab if you want to make the changes permanent.

link|improve this answer
3  
This is critical. A suddenly readonly mount point indicates some failures of the hard drive or the filesystem. First watch the logfiles for indication and if they are clean then issue the command. – mailq Aug 17 '11 at 14:40
Are you sure this is sudden? I interpreted the question as a partitition having been mounted read-only as a mistake. Your comment is spot-on for the situation you describe and a good warning, but I'm not sure this is the kind of situation the OP is in. – Eduardo Ivanec Aug 17 '11 at 14:51
I ran this. It provided no output, and still cannot be written to. I mounted with "mount /dev/sda3 /foo". I cd into /foo and try "touch foo.txt", get Permission denied. @Eduoardo Ivanec is right. This is not sudden. I think it is a mistake – coffee Aug 17 '11 at 14:52
@coffee - please do post the output of mount. You're running all commands (including the touch) as root, right? – Eduardo Ivanec Aug 17 '11 at 14:57
I've added the line I think you are interested in from 'mount'. It seems I can perform 'touch' if I use sudo, but how can I change the permissions so everybody can write there? – coffee Aug 17 '11 at 15:03
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.