• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Issue PHP Warning: touch(): Unable to create file /var/log/plesk/panel.log because Permission denied;

Ali Sekhavati

New Pleskian
Hi,

OS: Centos 5.5


I just upgraded my plesk to 12.5.30, I can log into my account and see my data but when I want to create/edit something, I get this error:

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, '"/var/log/plesk...') #4 /usr/local/psa/admin/plib/PleskException.php(26): Plesk_Log::err('"/var/log/plesk...') #5 /usr/local/psa/admin/plib/PleskException.php(13): report_crash('"/var/log/plesk...', Array, 'Zend_Controller...', 500, Object(Zend_Controller_Exception)) #6 [internal function]: plesk_exception_handler(Object(Zend_Controller_Exception)) #7 {main} thrown (Stream.php:81)



and this error in /var/log/plesk/sw-cp-server/error_log

"PHP message: PHP Warning: touch(): Unable to create file /var/log/plesk/panel.log
because Permission denied; File: /usr/local/psa/admin/plib/Plesk/Log.php, Line: 63"
while reading response header from upstream, client: 5.238.218.247, server: ,
request: "GET /admin/subscription/login/id/19?pageUrl=%2Fweb%2Foverview%2Fid%2Fd%3A19&returnUrl=%2Fadmin%2Fsubscription%2Foverview%2Fid%2F19 HTTP/1.1",
upstream: "fastcgi://unix:/var/run/sw-engine.sock:", host: "vps-10.com", referrer:
"https://vps-10205.com/admin/domain/list?context=domains"


I read everything around this issue on the Internet and tried to correct directory permissions, nothing worked.


I tried

#chown -R psaadm:root /var/log/plesk


I would really appreciate your help.

Thanks.
 
Do you have SELinux enabled? Have you tried to run

# plesk repair installation

?
 
I have tried # plesk repair installation a couple of time

but SElinux is disabled and I couldn't enable it. it seems my VPS kernel is compiled without it and it doesn't support SElinux at all.
 
Do you have the same output?

# namei -om /var/log/plesk/
f: /var/log/plesk/
dr-xr-xr-x root root /
drwxr-xr-x root root var
drwxr-xr-x root root log
drwxr-x--- psaadm root plesk
 
I had to run # namei -m /var/log/plesk/ (no -o option was available for me)

and I got this:

f: /var/log/plesk/
drwxr-xr-x /
drwxr-xr-x var
drwxr-x--- log
drwxr-x--- plesk
 
the owner is psaaadm

I issued the following command:

chown -R psaadm: root /var/log/plesk

before this command the owner was root


I have gone as far as #chmod go+rwx but nothing changed. I dont know which user wants to touch plesk.conf
 
Back
Top