Switched to php-fpm from mod_php, now permissions issues

Richpark

Verified User
Joined
Sep 25, 2014
Messages
55
We have been using mod_php for years WITHOUT mod_ruid2, so apache ran as the user "apache".

Since switching to php-fpm, phpMyAdmin reports the error:

Warning in ./libraries/logging.lib.php#59
fopen(./log/auth.log): failed to open stream: Permission denied

If I look in the phpMyAdmin folder, I can see that the majority of folders are set to webapps:webapps, but /log is set to apache:apache.

I'm assuming that php-fpm runs as a different user from "apache", so this is the issue.

Was this covered in one of the DA guides? I've read most of them, and I haven't seen this come up.

How do I resolve this? My concern is that phpMyAdmin is just the tip of the iceberg, I have over 1,200 vhosts with users saving their own files, this could be a nightmare.
 
but /log is set to apache:apache.
That's not correct. This should be webapps:webapps too.

If this is the only one you could fix this by using:
Code:
cd /var/www/html
chown webapps:webapps phpMyadmin -R
or
chown webapps:webapps phpMyAdmin-5.2.1-all-languages -R
change to your version number.

However, is you suspect more things might have the wrong user and/or permissions you can best run this script:
Code:
cd /usr/local/directadmin/scripts
./set_permissions.sh all
which should set everything correct.

Be aware on big systems this can take some time.

I presume you have seen the docs about the .htaccess support and such.
 
Back
Top