Unable to open statistics log for a particular domain: Reader.php PleskFatalException

Created:

2016-11-16 12:46:57 UTC

Modified:

2017-05-04 12:33:02 UTC

0

Was this article helpful?


Have more questions?

Submit a request

Unable to open statistics log for a particular domain: Reader.php PleskFatalException

Applicable to:

  • Plesk 12.5 for Linux
  • Plesk 12.5 for Windows

Symptoms

When trying to open logs for a specific domain in Domains > example.com > Logs , the following error gets displayed:

Internal error: Unable to open log file:
Message
Unable to open log file:
File
Reader.php
Line
86
Type
PleskFatalException

There are the following errors in /var/log/plesk/panel.log :

[13-May-2016 19:40:54 Europe/Berlin] PHP Warning: finfo_file(/var/www/vhosts/system/example.com/logs/error_log): failed to open stream: Permission denied; File: /opt/psa/admin/plib/LogBrowser/Reader.php, Line: 21

Cause

Incorrect permissions set on the aforementioned log file:

# stat /var/www/vhosts/system/example.com/logs/error_log
File: `/var/www/vhosts/system/example.com/logs/error_log'
Size: 1872633 Blocks: 4096 IO Block: 4096 regular file
Device: fe02h/65026d Inode: 218119312 Links: 2
Access: (0660/-rw-rw----) Uid: ( 0/ root) Gid: ( 0/ root)

whereas the correct ones are:

# stat /var/www/vhosts/system/example.com/logs/error_log
File: `/var/www/vhosts/system/example.com/logs/error_log'
Size: 1872633 Blocks: 4096 IO Block: 4096 regular file
Device: fe02h/65026d Inode: 218119312 Links: 2
Access: (0644/-rw-r--r--) Uid: ( 0/ root) Gid: ( 0/ root)

Resolution

  1. Check permissions set on the domain log files like the following:

    # stat /var/www/vhosts/system/example.com/logs/error_log
    File: `/var/www/vhosts/system/example.com/logs/error_log'
    Size: 1872633 Blocks: 4096 IO Block: 4096 regular file

    Device: fe02h/65026d Inode: 218119312 Links: 2Access: (0644/-rw-r--r--) Uid: ( 0/ root) Gid: ( 0/ root)

  2. If the permissions differ from the example above, set the correct ones:

    # chmod 644 /var/www/vhosts/system/example.com/logs/error_log

Alternatively, consider restoring virtual host directory permissions.

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