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 did something horrible when i was setting up my dedicated server using Ubuntu Server LTS. When i was setting up a server directory with files in it i wanted full access to the content. So what i originally wanted was to "chmod 755 -R ./" the directory. But i ran the command "chmod 777 -R /" by accident. I then tried to fix it all up but then i by a mistake ran "chmod 644 -R /" - How screwed am i? Now i cannot even chmod or ls. All permissions gone.

Is there a way to fix such issue? I know it's dumb.. And it's properly just me being over my head here... But i really messed up.

share|improve this question

migrated from stackoverflow.com Jun 23 '13 at 0:49

This question came from our site for professional and enthusiast programmers.

    
Maybe something for SuperUser or AksUbuntu. –  DaGardner Jun 22 '13 at 22:22
    
Thanks, ill post it there =) –  danniehansenweb Jun 22 '13 at 22:22
    
You may find this helpful: unix.stackexchange.com/q/12998/11750 –  Kevin Jun 22 '13 at 23:07
    
Can you reboot? If you can boot into recovery mode you can get a root shell (busybox, most commands built-in) and re-chmod /. The good(-ish) news is that since / was the first thing to be chmodded, chmod couldn't reach any of the other files, so they should be untouched (from their 777 state, and you can see my link above to deal with that). –  Kevin Jun 22 '13 at 23:15
    
N.b. there's no reason to use ./, it just makes it easy to make a mistake. If you want to act on the current directory, just use .. There are very, very few times the trailing / is necessary (and, as you have found, it can lead to trouble). –  Kevin Jun 22 '13 at 23:18

Your Answer

 
discard

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