How to Reset Permissions for a Plesk Virtual Host

Plesk No Comments

Many times I see customers accidentally changing permissions recursively for a whole domain, breaking Plesk functionality including log rotation. Here is how to fix it:

/usr/local/psa/admin/sbin/vhostmng --install-vhost --vhost-name=domain.tld --user-name=domain_user --set-content-permissions

Substitute domain.tld with the domain in question and domain_user with the domain user for that domain. If you accidentally change permissions for several domains you can also script that command extracting some of that information from the psa database.

Cheers.