So I was working and there was a directory that I was periodically changing to my user in a root terminal so that I could open the files in text editors, but I accidentally pressed / instead of . and this was the command I put out:
chown -R emil.emil /
Then immediately panicked ^C and put in another command, as I thought I could always change back the files I needed to access:
chown -R root.root /
So now I can't do su
from emil
to even try to fix this, as I'm getting permission denied error. I'm on Ubuntu could someone tell me if there is a way I could fix this, without absolutely reinstalling the whole thing.
TIP
If you are trying to get root access, and are getting this permission denied error when using su
try this command:
gksu gnome-terminal
It will prompt you for the root password and open a new root terminal for some reason this works and gives me root access, when su
doesn't.