Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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. –  Brayan Hernandez 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

1 Answer 1

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? –  Brayan Hernandez 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>? –  Brayan Hernandez Jul 24 '12 at 15:16

Your Answer

 
discard

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.