Reset / Correct Server Permissions for Plesk via SSH
Sometimes, you might accidentally chown or chmod system files via SSH on a server running Parallels Plesk Panel and find that you’re locked out of Plesk’s panel interface and you take down every website hosted on that server.
Fortunately, Plesk have some built in means to reset file/directory ownership and permissions back to their original defaults.
Make sure you connect to the server as root via SSH and run the following:-
for p in $(rpm -qa); do rpm --setugids $p; done
for p in $(rpm -qa); do rpm --setperms $p; done
And then, once these two commands have completed (be sure to run them in the above order), you can then run the following (Plesk 11.5+ only) just to be sure that all permissions have reset correctly for the virtual hosts (websites):-
If you encounter any issues, just let us know in the comments.