I changed the permissions of my /usr
directory to 777
by mistake and now my system give this error whenever I try to use sudo:
sudo: setuid must be root
How do I fix this issue?
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It only takes a minute to sign up.
Sign up to join this communityBased on your error, you didn't simply changed the permissions of /usr to 777, you did it recursively which is a more serious and problematic change.
Unless you have backups of your system directories, your best option is just to reinstall.
Go to recovery console (reboot, and chose recovery console ) and type
chown root:root /usr/bin/sudo
then
chmod 4755 /usr/bin/sudo
then
reboot
sudo
only, but other binaries are affected as well and are likely to cause issues too.
May 17, 2011 at 8:42
chmod +sS
you'll want to reinstall