Plesk backup task is failing: Cannot stat: Permission denied

Created:

2016-11-16 13:10:28 UTC

Modified:

2017-08-16 16:22:14 UTC

0

Was this article helpful?


Have more questions?

Submit a request

Plesk backup task is failing: Cannot stat: Permission denied

Applicable to:

  • Plesk for Linux

Symptoms

Plesk backup ends with following errors:

Failed to pack files July_example.com_user-data_1307261006 in /var/lib/psa/dumps/domains/example.com [ 117520279552 bytes free of 122090221568 bytes total on mount point 0]
/bin/tar: httpdocs/components/tmpForThumb_phpgt81Pc: Cannot open: Permission denied
/bin/tar: httpdocs/components/tmpForThumb_phpgt81Pc: Cannot open: Permission denied
/bin/tar: httpdocs/wp/wp-content/plugins/bulletproof-security/admin/htaccess/maintenance-mode.txt: Cannot stat: Permission denied
/bin/tar: Exiting with failure status due to previous errors

or:

Not all the data was backed up into /var/lib/psa/dumps/clients/cl_name/domains/example.com successfully. Total space: 12670980300; Available space: 7578406461; Mounted on: /. /bin/tar: .pki/nssdb: Cannot stat: Permission denied
/bin/tar: Exiting with failure status due to previous errors

Cause

Incorrect file or directory permissions for a domain that is included into a server-wide backup

Resolution

  1. Make sure that the latest microupdates are installed. If not, install the latest Plesk microupdates .

  2. Restore virtual hosts permissions using following the instructions for the installed Plesk version provided in Plesk Knowledge Base article: How to restore default permissions in the virtual host directory .

  3. In case the issue still persists, manually check permissions for the directories in /var/www/vhosts/example.com and change them accordingly. Default permissions are:

    • 0644 for files.
    • 0755 for directories.
  4. All directories inside domain in /var/www/vhosts/example.com , including the hidden ones should belong to a system user:

    # ls -la /var/www/vhosts/example.com/
    total 24
    drwx--x--- 6 example psaserv 4096 Aug 9 00:59 .
    drwxr-xr-x 19 root root 4096 Jul 31 17:49 ..
    drwxr-xr-x 2 example psacln 4096 Jun 14 23:19 error_docs
    drwxr-x--- 17 example psaserv 4096 Aug 9 03:45 httpdocs
    drwx------ 2 example root 4096 Aug 15 03:06 logs
    drwxr----- 3 10000 psacln 4096 Jun 14 23:19 .pki

    Change the ownership if some directories belong to a different user:

    # chown -R example /var/www/vhosts/example.com/.pki

Have more questions? Submit a request
Please sign in to leave a comment.