Fix permissions on linux root [closed]

-1

I made a mess here in my linux, I did this:

sudo chown -Rf www-data.www-data /*

And I gave a ctrl+c after 4 seconds ... because I saw the stupid thing that had done.

It was supposed to be this:

sudo chown -Rf www-data.www-data ./*

And now you're making a mistake in sudo su, how to fix this?

 /etc/sudoers tem como dono o uid 33, deveria ser 0
    
asked by anonymous 12.05.2016 / 22:54

1 answer

2

You can enter as a super user with the command su , unlike sudo , su authenticates as super user (Required super user password and not user password). >

Or login directly as a super user. "Start terminal mode and log in as root" .

After one of these steps, run the command:

$ chown -Rf root:root /bin/ /usr/ /dev /boot /etc /lib* /mnt /opt /proc /root /sys

The folder home is not among them so as not to cause problems with the user.

This will restore permission for most files in the var folder, some folders have users and groups other than root , if you are going to restore the / var

  

Logging in directly as superuser by terminal mode is the most recommended.

    
12.05.2016 / 23:28