Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

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

This question already has an answer here:

By Mistake on Ubuntu 9.04 my colleague has changed the permissions to 777 on root directory (/)

whats the best way to recover the permissions ?

share|improve this question

marked as duplicate by Falcon Momot, Smudge, Ward, yagmoth555, Jenny D Apr 13 at 16:01

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

2  
Was it recursive? – Dennis Williamson Nov 10 '10 at 7:14
    
Yes, it was :( ! – necromancer Nov 10 '10 at 17:08
up vote 2 down vote accepted

If he did not chmod -R the Directory Root - don't panic. Changing back the root directories permission to default can be achieved via:

chmod 755 / 
share|improve this answer
1  
Double check it's owned by root:root as well. – Philip Reynolds Nov 10 '10 at 10:35
1  
I've re-installed ubuntu !! now onwards I've to be careful for sudoers users !!! – necromancer Nov 10 '10 at 17:09

if it's recursive , you could mount a new ubuntu installation and make a script which compares default permissions for every file with yours. Of course it cannot work for files other than the basic installation. For the extra files you could reinstall the "world" (I borrow the term from gentoo, i don't how it's called in Ubuntu) {It's the file which says what packages are installed on your system}

share|improve this answer
    
for future reference, reinstalling world in ubuntu is apt-get --reinstall install $(dpkg --get-selections|grep install |grep -v deinstall|awk '{print $1}'), fuzzy memory but tested code – Behrooz Jul 26 '15 at 6:19

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