0

I ran this command sudo chown -hR root /.

and now flash is disabled, chrome does not work, nothing works, I cannot even access folder directories outside of the terminal. I then logged out and tried to log back in and my password for the log on screen did not even work!

These were the posts I attempted to read and follow Change folder permissions and ownership

I have once before booted to the terminal, I forget the keypress function right now, but I believe this is the route I must take?

When I was logged on I received this error as I tried to follow the following posts' guidelines to somehow remedy what I previously did https://stackoverflow.com/questions/3740152/how-to-set-chmod-for-a-folder-and-all-of-its-subfolders-and-files-in-linux-ubunt

To change all the directories to 755 (-rwxr-xr-x):

find /opt/lampp/htdocs -type d -exec chmod 755 {} \;

To change all the files to 644 (-rw-r--r--):

find /opt/lampp/htdocs -type f -exec chmod 644 {} \;

but nothing worked from these commands except for this error message:

sudo: /usr/bin/sudo must be owned by uid 0 and hav the setuid bit set

I originally messed around with my permissions as I was annoyed with using sudo here and there and not having my commands fully work. I merely wanted to pip install twilio and pip install flask but previously when I ran these commands (with or without sudo) I received an error message telling my python3.4/dist-packages/ was unable to write the installation (I am using Python 2.7 - perhaps this is a problem?)

phillipsk
  • 125
  • 1
  • 8

1 Answers1

0

You need to change the ownership of each file back to the way it was. Basically from what I understand from the man pages is that you made every symbolic linked file to the user group 'root'. The problem where it occurred was when you did the /. because that just means you did the chown recursively in the root folder. You will have to go back through each link to set it with the right ownership.

Good luck!

  • Could I run another command on /. – phillipsk Nov 18 '14 at 19:18
  • 1
    No, he made every file owned by root and in doing so reset the suid bits on any files that had it ( like sudo ), so now has no way back. – psusi Nov 18 '14 at 19:22
  • @phillipsk You might just want to remove all data from the system that is valuable to you and restart. You did a command on the level below rm -rf / but you'll still need a new installation. – Jacob Bryan Nov 18 '14 at 19:40