Unable to access Logs section: System error 13: Permission denied

Created:

2016-11-16 12:43:20 UTC

Modified:

2017-08-16 16:14:47 UTC

0

Was this article helpful?


Have more questions?

Submit a request

Unable to access Logs section: System error 13: Permission denied

Applicable to:

  • Plesk 11.x for Linux
  • Plesk 12.0 for Linux

Symptoms

You get the following error when click on Websites and Domains > Logs tab:

Error message or request description : ERROR: PleskUtilException
filemng: stat failed: Permission denied
System error 13: Permission denied

Or log rotation does not work. The following command fails with the same error:

# /usr/local/psa/logrotate/sbin/logrotate -v -f /usr/local/psa/etc/logrotate.d/example.com

Cause

The ownership on the following directories were set incorrectly:

# ls -ld /var/www/vhosts/example.com/statistics
dr-xr-x--- 7 sys_user psaserv 4096 Jan 21 11:16 /var/www/vhosts/example.com/statistics

# ls -ld /var/www/vhosts/example.com/statistics/logs
dr-xr-x--- 2 root root 4096 Jan 21 11:16 /var/www/vhosts/example.com/statistics/logs

Directories should be owned by domain's system user and by psaserv group.

Resolution

  1. Connect to the server using SSH .
  2. Find system user for the domain in question:

    # grep example.com /etc/passwd | grep -v web_users
    sys_user:x:10037:506::/var/www/vhosts/example.com:/bin/false

    Note: Also you can find the correct system username at the Websites & Domains > Web Hosting Access > User Account .

  3. Set proper permissions for the directories below:

    # chown sub86_49:psaserv /var/www/vhosts/example.com/statistics/
    # chown sub86_49:psaserv /var/www/vhosts/example.com/statistics/logs/

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