Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question

migrated from Jan 27 '11 at 12:47

This question came from our site for professional and enthusiast programmers.

should be on serverfault, but i'll tell you now your best bet is to re install OS - all the setuid and setgid bits will be gone, short of finding out what all of those are and running chmod +sS you'll want to reinstall – tobyodavies Jan 27 '11 at 6:18
i had the same problem 2 weeks ago. reinstalling is the only solution. – theTuxRacer Feb 16 '11 at 10:03

Based 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.

share|improve this answer
With the caveat that you could manually reset every file of every sub-directory to the right setting by manually comparing it to a good Ubuntu install. – djeikyb Apr 17 '11 at 18:46

Go to recovery console (reboot, and chose recovery console ) and type

chown root:root /usr/bin/sudo


chmod 4755 /usr/bin/sudo



share|improve this answer
It'll work for sudo only, but other binaries are affected as well and are likely to cause issues too. – Lekensteyn May 17 '11 at 8:42

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.