Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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 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: – 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


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