5
rated 0 times
[
5]
[
0]
/ answers: 1 / hits: 41994
/ 3 Years ago, fri, june 4, 2021, 5:50:28
So, I did a stupid thing...
I was installing some software (Java SE 7, if you must know) from a tarball, and I got tired of using sudo
, so I went and changed the owner of my /usr
directory to myself.
$ sudo chown -R sammy /usr
Whoops!
Since sudo
lives in /usr/bin/
, it also changed owner. Now, I can't use it anymore. Have I accidentally been caught in a sudo-Catch 22? I can't use apt-get install
or any number of other essential features of my shell environment.
$ sudo
sudo: must be setuid root
Is there a way to change the owner of this directory (and subdirectories, too) back to root
?
More From » permissions