Applicable to:
- Plesk for Linux
Symptoms
Plesk upgrade failed, an attempt to open Plesk fails with the following error:
PLESK_INFO: 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:
PLESK_INFO: 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
Or with following error:
PLESK_INFO: ERROR: Uncaught exception 'Zend_Log_Exception' with message '"/var/log/plesk/panel.log" cannot be opened with mode "a"' in /usr/local/psa/admin/externals/Zend/Log/Writer/Stream.php:81 Stack trace: #0 /usr/local/psa/admin/plib/Plesk/Log.php(69): Zend_Log_Writer_Stream->__construct('/var/log/plesk/...') #1 /usr/local/psa/admin/plib/Plesk/Log.php(370): Plesk_Log::init() #2 /usr/local/psa/admin/plib/Plesk/Log.php(262): Plesk_Log::get() #3 /usr/local/psa/admin/plib/Plesk/Log.php(168): Plesk_Log::log('panel', 3, 'Unable to conne...') #4 /usr/local/psa/admin/plib/PleskException.php(26): Plesk_Log::err('Unable to conne...') #5 /usr/local/psa/admin/plib/PleskException.php(10): report_crash('Unable to conne...', Array, 'PleskDBExceptio...', 500, Object(PleskDBException)) #6 [internal function]: plesk_exception_handler(Object(PleskDBException)) #7 {main} thrown (Stream.php:81)
Cause
Owner for Plesk log file
/var/log/plesk/panel.log
is not correct.
Resolution
Connect to the server via SSH.
For Plesk Onyx and 12.x:
Move panel.log to another place, restart sw-engine and sw-cp-server services:
# mv /var/log/plesk/panel.log /var/log/plesk/panel.log.bk
# service sw-engine restart && service sw-cp-server restart
If the issue persists, correct permissions to the following folder:
# chmod 0755 /var/log/
# chown psaadm /var/log/plesk/
For older Plesk versions:
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
Change permissions if required with chown command and restart Plesk service:
# chown psaadm:root /usr/local/psa/admin/logs/panel.log && chown psaadm:root /usr/local/psa/admin/logs/
# service psa restart
If the issue persists, correct permissions to the following folder:
# chmod 0755 /var/log/
Comments
9 comments
I am getting these exact symptoms. Specifically the third error on the Plesk dashboard.
I do appreciate the time taken to write these steps.
However, these steps did not solve the issue for me personally.
@Clintvee, hi, what is your Plesk version?
It is 12.0.18
@Clintvee, did you restart Plesk services?
Please show me an output of these commands:
# ls -la /var/log/plesk/panel.log
# ls -ld /var/log
-rw-r----- 1 psaadm root 0 Apr 11 13:27 /var/log/plesk/panel.log
drwx------ 5 root root 4096 Apr 11 13:56 /var/log
hi, can you help me?
fooked my server by changing all users and groops in /var/
looks like this now,
[root@ms142 var]# ls -la
insgesamt 140
drwxr-xr-x. 26 root root 4096 11. Okt 2012 .
dr-xr-xr-x. 26 root root 4096 7. Apr 14:22 ..
drwxr-xr-x. 2 root root 4096 22. Mär 2017 account
drwxr-xr-x. 18 root root 4096 6. Mär 10:48 cache
drwxr-xr-x. 2 psaadm root 4096 9. Feb 14:00 crash
drwxr-xr-x. 2 psaadm root 4096 22. Nov 2013 cvs
drwxr-xr-x. 4 psaadm root 4096 8. Okt 2012 db
drwxr-xr-x. 3 root root 4096 23. Sep 2011 empty
drwxr-xr-x. 2 root root 4096 23. Sep 2011 games
drwxr-xr-x. 44 psaadm root 4096 11. Apr 04:19 lib
drwxr-xr-x. 2 psaadm root 4096 23. Sep 2011 local
drwxrwxr-x. 9 root lock 4096 11. Apr 16:04 lock
drwxr-xr-x. 23 psaadm root 4096 10. Apr 04:05 log
drwx------. 2 root root 16384 8. Okt 2012 lost+found
lrwxrwxrwx 1 root root 10 8. Okt 2012 mail -> spool/mail
drwxr-x--- 6 psaadm root 4096 26. Jan 12:40 named
drwxr-xr-x. 2 psaadm root 4096 23. Sep 2011 nis
drwxr-xr-x. 2 root root 4096 23. Sep 2011 opt
drwxr-xr-x 2 psaadm root 4096 8. Okt 2012 parallels
drwxr-xr-x. 2 root root 4096 23. Sep 2011 preserve
-rw-rw-r-- 1 root root 12608 28. Okt 2012 proftpd.delay
drwxr-xr-x 8 psaadm root 4096 29. Jan 12:06 qmail
drwxr-xr-x. 32 psaadm root 4096 11. Apr 16:04 run
drwxr-xr-x. 13 root root 4096 8. Okt 2012 spool
drwxrwxrwt. 2 root root 12288 11. Apr 04:17 tmp
drwx------ 3 root bin 4096 7. Apr 14:23 webmin
drwxr-xr-x 9 root root 4096 19. Okt 18:44 www
drwxr-xr-x. 3 psaadm root 4096 8. Okt 2012 yp
used the comand sudo chown -R on the folder
so no access to plesk and the websites
@Clintvee, permissions on /var/log are incorrect. Do the following and restart Plesk services:
# chmod 0755 /var/log/
@Andy, in this case, I can suggest only comparing with a working server and changing the permissions manually. It also depends on how much permissions were changed.
The support team for our hosting company ended up resolving it in the end.
I checked the permissions of the /var/log/ file and can see they are now
drwxr-xr-x 6 root root 4096 Apr 12 03:20 log
Thanks for your support!
Please sign in to leave a comment.