Plesk

Plesk Repair Kit reports the warning: There are files or directories with suspicious permissions in the root directory of the domain

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.

Resolution

  1. Connect to the Plesk server via SSH.

  2. 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 {} ;

Exit mobile version