0

How can I undo the following command: chmod -R a+rwX /? I used it to modify some permissions, but it did not do as I had expected.

5
  • 2
    Usually you need to re-install. I have seen only one person recover from this problem.
    – Panther
    Nov 15, 2013 at 4:13
  • @bodhizazen, How did they do it?
    – tjons
    Nov 15, 2013 at 4:17
  • 3
    @TJonS I know 1 person that compared each individual file to the file on another system. I would re-install...
    – Rinzwind
    Nov 15, 2013 at 6:38
  • if you search this site, someone posted a script here on this site. otherwise it is as Rinzwind indicated, one file at a time. considering it takes 15 min to re-install ...
    – Panther
    Nov 15, 2013 at 13:30
  • I reinstalled. Was very easy
    – tjons
    Nov 15, 2013 at 15:05

1 Answer 1

4

I had a similar issue faced once.

Now you have two options as you have changed the permission of / and a lot of services depends upon it. (Ex: most probably your sudo su must not be working etc.)

  1. The short way is to re-install your system again. This is the best way I would recommend take backup of your files and data and do a re-install.

  2. The long way is to you will have to boot your system in recovery mode then mount the / partition in rw mode using

    mount -o remount,rw /

    mount --all

and then you will have to set permissions of various services manually so yes it is possible to do that but for this you need to know what are the permissions of these services in a default ubuntu working OS.

Now in this case you may seem to change the permission of many of the services but there are chances that you may miss alot of special permissions which may cause problem in the near future.

You must log in to answer this question.

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