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.

Hi I recently killed my etc folder by running:

sudo chmod etc 417.

Due to sudo being in that folder it cannot be accesed now, so I have to change the permissions back to the correct ones using the recovery menu.

In recovery i tried this from recovery:

root@joeri-VirtualBox:/# chmod 755 etc
chmod: changing permissions of 'etc' : read-only file system
root@joeri-VirtualBox:/# cd etc
root@joeri-VirtualBox:/etc# ls -ld
drw-rw-rwx 139 root root 12288 2012-04-19 16:29

Even when I am root i cannot change it because it is read-only. How do I change these permissions?

Thanks

Joeri.

share|improve this question
    
This: sudo chmod etc 417. is not a valid instruction. It will end up with an error message invalid mode etc. Might be needed to include the exact command that was used. –  Rinzwind Apr 19 '12 at 8:15

1 Answer 1

up vote 2 down vote accepted

You have to remount the root file system with read/write permissions if you want to do changes in recovery mode mount -o remount,rw / I think is the command. Then you can modify the filesystem.

share|improve this answer
    
yes this fixed it! Thank you :) (twice) –  Joeri Friederich Apr 19 '12 at 8:58

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.