Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am using Ubuntu 11.04.

I mistyped and wrote sudo chmod 444 / instead of writing /home.

Everything went blank and icons started disappearing, and now when I try to run Ubuntu, it hangs on the initial Ubuntu sign.

I know that I have changed the permissions for root itself, but is there any way I can revert back?

share|improve this question

2 Answers 2

up vote 5 down vote accepted

If you've only chmod'ed you root directory:

In linux, use chmod 755 to restore correct root directory access rights.

In Mac OS X, the sticky bit must be set, too. Use chmod +t / if you've already corrected the rights to 755. If not, you can do both at once using chmod 1755 /.

For both systems: Don't forget sudo if necessary.

share|improve this answer
    
Thanks a lot :) Entered this in the root prompt and everything got recovered .... –  user57162 Oct 25 '11 at 19:24
    
Did chmod / once for educational reasons and took me quite some while to figure out the sticky but stuff. :) –  Jens Erat Oct 25 '11 at 19:27
    
-1, / is not supposed to have the sticky bit set. It's only for /tmp. –  grawity Oct 25 '11 at 19:43
1  
@grawity Looks you're right, it isn't set on my linux boxes either. You need it on OS X machines, I misconcieved this would be the same in linux. Will edit my answer. –  Jens Erat Oct 25 '11 at 19:55
2  
@grawity: it's because OS X allows the admin group write access to /, and without the sticky bit an admin could do nasty things like rename & replace top-level dirs without needing to go through any special authentication (sudo or the like). –  Gordon Davisson Oct 25 '11 at 23:00

You may be able to boot into single user mode/rescue mode at the initial grub bootloader
If that doesn't work you can use an ubuntu or other boot disk such as Knoppix to boot your system, mount the / fs and correct it.
This is assume you did chmod 444 / not chmod -R 444 /

share|improve this answer
1  
Good call on the recursion switch... let's hope you're right. –  andyortlieb Oct 25 '11 at 19:14
    
how do i boot in the rescue mode ? And yes i did did the first one not the second –  user57162 Oct 25 '11 at 19:14
    
Can you still get to a shell at all? Do you still have one open? –  andyortlieb Oct 25 '11 at 19:17
    
Okayz things have changed ... went into recovery mode and then clicked on drop to root shell prompt ... Can you tell me what should i now enter to correct everything ? –  user57162 Oct 25 '11 at 19:19
    
root is normally 755, so if you can do chmod 755 / that should restore it to a normal state –  freedenizen Oct 25 '11 at 19:30

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.