Search code examples
linuxcentosroot

How to change the root folder permission in linux centos


I have currently this permission in my / folder.

drwxr-xr-x. I have seen that anyone can open that folder.

How can remove the executable permission from that so that other permission remain same Also is any other main folder in / where i need to remove public executable permission


Solution

  • By removing executable permission in / you'll make anything under it inaccessible. You can do it with chmod -x / but it's highly inadvisable.

    For most practical purposes this will make everything inaccessible to regular users. Even worse, this will likely prevent ssh connections to the box so even with root you'll need physical access to a tty.