Plesk fails to open: cannot be opened with mode "a"

Created:

2016-11-16 13:13:08 UTC

Modified:

2017-05-23 09:09:43 UTC

1

Was this article helpful?


Have more questions?

Submit a request

Plesk fails to open: cannot be opened with mode "a"

Applicable to:

  • Plesk 12.5 for Linux
  • Plesk 10.4 for Linux
  • Plesk 11.0 for Linux
  • Plesk 11.5 for Linux
  • Plesk 12.0 for Linux

Symptoms

Plesk upgrade failed, an attempt to open Plesk fails with the following error:

ERROR: Zend_Log_Exception
"/usr/local/psa/admin/logs/panel.log" cannot be opened with mode "a"

0: Stream.php:66
Zend_Log_Writer_Stream->__construct(string '/usr/local/psa/admin/logs/panel.log')
1: Abstract.php:84
CommonPanel_Application_Abstract->_initLog()
2: Abstract.php:31
CommonPanel_Application_Abstract->run()
3: Abstract.php:19
CommonPanel_Application_Abstract::init()
4: auth.php3:137

Or with such error:

    ERROR: Uncaught exception 'Zend_Log_Exception' with message '"/usr/local/psa/admin/logs/panel.log" cannot be opened with mode "a"' in /usr/local/psa/admin/plib/Zend/Log/Writer/Stream.php:81

Cause

Owner for Plesk log file /usr/local/psa/admin/logs/panel.log is not correct.

Resolution

For Plesk version < 12:

Check permissions for /usr/local/psa/admin/logs/panel.log , they should look as below:

    # ls -la /usr/local/psa/admin/logs/panel.log
-rw-r----- 1 psaadm root 67727 Jan 17 02:30 /usr/local/psa/admin/logs/panel.log

If you see that owner is root as below:

    # ls -la /usr/local/psa/admin/logs/panel.log
-rw-r----- 1 root root 67727 Jan 17 02:30 /usr/local/psa/admin/logs/panel.log

Change permissions with chown command:

    # chown psaadm:root /usr/local/psa/admin/logs/panel.log

Also, sometimes issue may cause due to incorrect ownership for directory /usr/local/psa/admin/logs/ , they should look as below :

# ls -ld  /usr/local/psa/admin/logs/
drwxr-x--- 2 psaadm root 4096 Mar 3 10:00 /usr/local/psa/admin/logs/

For Plesk 12:

In Plesk 12.0.18 log files are stored into /var/log/plesk/ directory and /usr/local/psa/admin/logs/ folder contains only link-files. Due to this fact permissions for /var/log/plesk/ folder and /var/log/plesk/panel.log logfile should be checked and corrected as above if it is not.

Restart psa service after changes

#service psa restart
Have more questions? Submit a request
Please sign in to leave a comment.