I am trying to run the following command:
$ echo "My username is: `whoami`"
My username is: d
$ sudo chown -R `whoami` /usr/local/lib/node_modules
sudo: /usr/bin/sudo must be owned by uid 0 and have the setuid bit set
I don't understand what the problem is because root is uid 0:
$ id -u root
0
And the setuid seem fine:
$ ls -l /usr/bin/sudo
-rwxr-xr-x 1 4755 root 155008 Feb 10 2014 /usr/bin/sudo
Best Answer
The Setuid bit is not set. If it were, the permissions would have an
s
instead of the firstx
:Try using
pkexec
to set it correctly:Though I doubt that's the only problem you are going to have.