- Plesk 12.5 for Linux
- Plesk 10.x and below for Linux
commands were run on system directories like
. How to restore correct system files permissions and ownerships?
Permissions can be reset to their defaults using the following commands:
# for p in $(rpm -qa); do rpm --setugids $p; done
# for p in $(rpm -qa); do rpm --setperms $p; done
Note : The order in which you execute the commands is important. When changing permissions and ownerships on files, always change the ownerships first, and then the permissions. Otherwise, if the files have a SUID bit set, for example, the bit set may get cleared.
See these forum threads for further reference:
In some cases, even after running the above commands, the ownerships for some files or folders may still be incorrect. Make sure you check these lists:
You can also verify the correctness of the ownerships you have reset by comparing them with those on a working server.