I just made a huuuge mistake. I typed the following as root:
chown chris ./
So it change perm to everything! Now I have problem booting because of these permissions. How do I fix it?
I just made a huuuge mistake. I typed the following as root:
chown chris ./
So it change perm to everything! Now I have problem booting because of these permissions. How do I fix it?
Given your response to the other answer, it sounds like you've run a very different command. Both /.
./
variants would be quite easy to reverse but it sounds like you've actually run something with recursion, like chown -r /
.
This would systematically rewrite the permissions on the entire system. It's much more destructive and almost impossible for a beginner to unravel.
Assuming that's the case —or you're unable to confirm exactly what you did— my standing suggestion is you backup any data from a LiveCD and reinstall. It might sound a little severe but honestly, picking through every permission is really hard.
In comparison, reinstalling is very easy.
Even more so when you haven't been using Ubuntu for very long.
Boot into recovery mode: https://wiki.ubuntu.com/RecoveryMode
Mount / read-write and change the owner of / back to root:
mount -o remount,rw /
chown root /
-r
, and in that case it wouldn't have had the error about sudo
... reinstallation time...
– Rmano
Oct 28 '15 at 14:01