root directory permissions changed to 777 by mistake whats now?

12,118

Solution 1

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 / 

Solution 2

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:
12,118

Related videos on Youtube

Quinn Wynn
Author by

Quinn Wynn

;-) OPEN ERP ;-)

Updated on September 17, 2022

Comments

  • Quinn Wynn
    Quinn Wynn almost 2 years

    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 ?

    • Admin
      Admin over 13 years
      Was it recursive?
    • Admin
      Admin over 13 years
      Yes, it was :( !
  • Quinn Wynn
    Quinn Wynn over 13 years
    I've re-installed ubuntu !! now onwards I've to be careful for sudoers users !!!
  • patriot
    patriot almost 9 years
    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