I accidentally executed

sudo chmod -R 777 /

I was actually trying to change a specific folder permission recursively, btw i did stop the command before it changed everything.

But now, i can't execute for example


Every time i try to sudo something it throws me this error:

effective uid is not 0, is sudo installed setuid root?

Btw i know i can use chown -R root:root /usr/bin where sudo is located, but of course i don't have the permissions to do this.

So, how can i revert this process? Or at least save the sudo file without reinstalling everything?

The system is still connected to the internet and seems to work fine besides the sudo issue.

Thanks in advance.

1 Answer 1


So, how can i revert this process?

You do not. At least it will be hours of work if you want to reset every file to what it is suppose to be.

I would advice to use the live dvd to make a backup of your personal files and settings and do a re-install without a format (this should replace all the system files and keep your personal files (the backup is for insurance)).

  • And apps for example, would they keep working? After backup and reinstall without format of course. 3rd party apps.
    – NeoVe
    May 6, 2014 at 21:35
  • 1
    @NeoVe most likely you need to re-install them (but they will keep the settings you set them on)
    – Rinzwind
    May 6, 2014 at 21:50

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .