Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I accidentally locked my Ubuntu System. Now everything is read only. The closest i can remember which might have done this is, I was trying to change the authority of a fstab symllink with chown -h myusername /db. Now everything is read only, file system, mounted volume, all except my home folder. Even when i open the file browser as admin i.e. sudo nautilus i can't create and change any file or folder.

What might have caused this? Help me turn things back to normal.

share|improve this question

1 Answer 1

It sounds like you've accidentally changed the permissions of /etc/fstab. You should be able to use sudo because /var/run/sudo is mounted on the /var/run filesystem (or /run for Oneiric and up).

First, make the root partition writable again:

sudo mount -o remount,rw /

Next, restore the permissions:

sudo chown root: /etc/fstab

After that, future boots should not make everything read-only.

share|improve this answer
    
Ok, the filesystem and new mounts are working, but the previously mounted drives and thumb drive are still read only. How to fix them. –  mrNepal Oct 30 '11 at 8:35
    
Use mount to find the mount points and use the remount trick from the answer. –  Lekensteyn Oct 30 '11 at 9:28
    
I hope I know how to?, I umount the drive, and tried this syntax, sudo mount /dev/sda5 -o removount,rw /, but it didn't work –  mrNepal Oct 31 '11 at 7:06
    
Can you tell me how to find the mount points? –  mrNepal Oct 31 '11 at 12:16
    
Run the command mount. Really, without any options, it prints mounted filesystems. –  Lekensteyn Oct 31 '11 at 13:09

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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