Plesk File Manager shows error: System error 13: Permission denied on WordPress

Created:

2017-06-09 11:58:27 UTC

Modified:

2017-08-16 16:46:58 UTC

0

Was this article helpful?


Have more questions?

Submit a request

Plesk File Manager shows error: System error 13: Permission denied on WordPress

Applicable to:

  • Plesk for Linux

Symptoms

Trying to edit a theme file from WordPress editor fails and following errors are shown.

Error is shown in WordPress:

PLESK_INFO: Error: Failed to copy files storage to destination path. stderr: filemng: Cannot open destination file '/var/www/vhosts/example.com/httpdocs/wp-content/themes/yourtheme/style.css.y0xsmY'
System error 13: Permission denied

Error is shown in Plesk debug log /var/log/plesk/panel.log :

CONFIG_TEXT: ERR [util_exec] proc_close() failed ['/opt/psa/admin/bin/filemng' 'userweb' 'cp2perm' 'phpudeFew' '/var/www/vhosts/example.com/httpdocs/wp-content/themes/yourtheme/style.css' '644'] with exit code [1]
[2017-06-09 12:51:51] ERR [1] '/opt/psa/admin/bin/filemng' 'userweb' 'cp2perm' 'phpudeFew' '/var/www/vhosts/example.com/httpdocs/wp-content/themes/yourtheme/style.css' '644' failed with code 1.
stdout:
filemng: Cannot open destination file '/var/www/vhosts/example.com/httpdocs/wp-content/themes/yourtheme/style.css.bZOHhY'
System error 13: Permission denied
stderr:
filemng: Cannot open destination file '/var/www/vhosts/example.com/httpdocs/wp-content/themes/yourtheme/style.css.bZOHhY'
System error 13: Permission denied

Trying to rename a file from Plesk FileManager fails with following error:

CONFIG_TEXT: ERR [util_exec] proc_close() failed ['/opt/psa/admin/bin/filemng' 'userweb' 'mv' '/var/www/vhosts/example.com/httpdocs/wp-content/themes/yourtheme/style.css' '/var/www/vhosts/example.com/httpdocs/wp-content/themes/yourtheme/style.css.bak'] with exit code [1]
[2017-06-09 13:30:04] ERR [1] '/opt/psa/admin/bin/filemng' 'userweb' 'mv' '/var/www/vhosts/example.com/httpdocs/wp-content/themes/yourtheme/style.css' '/var/www/vhosts/example.com/httpdocs/wp-content/themes/yourtheme/style.css.bak' failed with code 1.
stdout:
mv: cannot move ‘/var/www/vhosts/example.com/httpdocs/wp-content/themes/yourtheme/style.css’ to ‘/var/www/vhosts/example.com/httpdocs/wp-content/themes/yourtheme/style.css.bak’: Permission denied
filemng: Error occurred during /bin/mv command.
stderr:
filemng: Error occurred during /bin/mv command.

Cause

Wrong permissions or owner on directory and subdirectories.

Resolution

  1. Connect to the server using SSH .
  2. Run the following command to repair file permissions by Plesk:

    # plesk repair fs example.com
    Checking virtual hosts' file system
    There are files or directories with suspicious permissions in the
    root directory of the domain 'example.com' ..................... [WARNING]

  3. Correct the permissions for the affected folder, setting the system user and Plesk service group:

    # chown -R system_user.psaserv/var/www/vhosts/example.com/httpdocs/wp-content/themes/

    Note: System user should be the same as shown in Plesk > Domains > example.com

  4. Check permissions again and OK message should be displayed:

    # plesk repair fs -verbose example.com
    Checking virtual hosts' file system ................................. [OK]
    Error messages: 0; Warnings: 0; Errors resolved: 0

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