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 recently messed up my ownership and read/write rights to very important files which doesnt allow me to log in to ubuntu once past boot. I've tried several chmod and chown commands to revert the files back but have a problem doing so, first off the ownership of the files is wrong, and on top of that some are only read files and I need to convert them. I get the error :

sudo: must be setuid root

as well as another error which says the ownership rights are 100 when they should be 0(root). I really do not want to re-install a fresh copy there are very important files on the system that I need.

share|improve this question
Please read Why does nothing work after I randomly changed some file permissions? -- and in the future, don't do things with superuser permissions if you do not exactly know what you are doing. That's why those things are not given to the "non-privileged" user. – Izzy Jul 24 '12 at 9:06
I know why it doesn't work, what I need is help fixing it. – Ferdinand Jul 24 '12 at 15:15
And that's explained in the linked questions answers (especially bodhi's). Did you try to follow there? It's also explained there how to make sudo work again first (a little closer to the end). – Izzy Jul 24 '12 at 16:06
up vote 1 down vote accepted

Use the ubuntu installation disk and reboot into the 'rescue' mode.

You will then get a limited root shell and can mount the affected disk(s) and use chown/chmod to fix the problem files.

Then remove the ubuntu installation disk and reboot.

share|improve this answer
I dont actually have the disk, would it work in the same fashion if I put the file in a USB and boot from that? Also I can access the whole root through recovery mode, does that not work for this situation? – Ferdinand Jul 23 '12 at 22:03
it should if you can boot from it. And yes you would access your disk by mounting your ROOT disk after you get the recovery shell root prompt. – mdpc Jul 23 '12 at 22:06
Also, you should be able to get an ISO for Ubuntu on-line if you need to. I don't think that it would matter what version, as long as the drivers and filesystems are relatively standard. What you want is to get to the root rescue shell and be able to mount your root, and make use chmod/chown maybe edit the sudoers file. – mdpc Jul 23 '12 at 22:07
I got the iso file on a thumb drive, how do I run it on the machine>? – Ferdinand Jul 24 '12 at 15:16

Your Answer


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

Not the answer you're looking for? Browse other questions tagged or ask your own question.