Plesk permission recovery



So recently i made the mistake of running ‘Chown’ on the wrong directory and it messed up my site and all sub-domains.

Now on a regular /var/www type set up thats an easy fix. However, this was on a Plesk server.

For those of you who use Plesk, will be very familiar with how particular Plesk can be and how differently it is configured as a web server.

Using the built in features for Plesk I was unable to perform the permission reset. I’m not sure if it was messing up or not running at all.

Perhaps you can get it working. For other version of Plesk please refer to this KB article by Parallels
 /usr/local/psa/admin/sbin/vhostmng-structure --install-vhost –vhost-name=leonteale.co.uk --user-name=leonteale -- www-root=/var/www/vhosts/leonteale.co.uk/httpdocs --cgi-bin-path=/var/www/vhosts/leonteale.co.uk/cgi-bin --set-content-permissions

So this is where this script comes along.

My script can be found here at the usual place at my pastebin

Usage is simple:
sh recover_plesk_directories.sh domain.tld
Hopefully this will come in use for someone as it has for me.

Comments

Popular posts from this blog

Null Session Domain Controller Enumeration

MS15-034: Vulnerability in HTTP.sys Could Allow Remote Code Execution

NetBIOS / NBNS Spoofing