Applicable to:
- Plesk for Linux
Symptoms
One of the following warnings are reported by the Plesk Repair Kit extension or the command-line utility plesk repair fs
:
There are files or directories with suspicious permissions in the root directory of the domain 'example.com'.
There is incorrect ownership on some items in the WWW root directory of the domain example.com
One or more files or directories in the root directory of the domain 'example.com' are either writable by anyone or neither readable nor writable by the owner. Such permissions are insecure and may result in or indicate a security breach.
Cause
There are files and/or folders inside the domain's document root directory with incorrect permissions/ownership which cannot be fixed automatically.
if user experience should be improved, please create a new PPS
Resolution
-
Connect to the Plesk server via SSH.
-
Fix permissions on files and directories inside the domains document root directory:
Note: If a directory or file require special permissions these commands may be omitted and the warning/errors from Repair Kit can be ignored.
Note: Replace example.com with an actual domain name.
# find /var/www/vhosts/example.com/httpdocs/* -type d -exec chmod 0755 {} \;
# find /var/www/vhosts/example.com/httpdocs/$* -type f -exec chmod 0644 {} \;-
If this is a subdomain, change the path:
# find /var/www/vhosts/example.com/subdomain_name/* -type d -exec chmod 0755 {} \;
# find /var/www/vhosts/example.com/subdomain_name/$* -type f -exec chmod 0644 {} \;
-
Comments
2 comments
There should be a 'plesk repair fs' option to fix that, shouldn't it?
HI Luis Talora this is a warning because some files inside the document root may needs permissions different to 755 or 644 according to your needs. If you run plesk repair fs -v -n you will see which files exactly.
Please sign in to leave a comment.