Doc #67445 [Csd->Nab]: cannot run PHP-FPM master process by www-data user

From: Date: Sun, 15 Jun 2014 14:14:00 +0000
Subject: Doc #67445 [Csd->Nab]: cannot run PHP-FPM master process by www-data user
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-11284@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=67445&edit=1 ID: 67445 Updated by: sobak@php.net Reported by: multitor4 at gmail dot com Summary: cannot run PHP-FPM master process by www-data user -Status: Closed +Status: Not a bug Type: Documentation Problem Package: Unknown/Other Function Operating System: Debian PHP Version: 5.5.13 Block user comment: N Private report: N Previous Comments: ------------------------------------------------------------------------ [2014-06-15 12:25:00] multitor4 at gmail dot com My mistake ------------------------------------------------------------------------ [2014-06-14 23:53:49] multitor4 at gmail dot com Description: ------------ My PHP-FPM configuration works: I could run php-fpm with sudo php-fpm & command, and with ps aux | grep "php-fpm" I could see one master process running as root, and two daughter processes running as www-data user: (output stripped for convenience) root php-fpm: master process (/usr/local/etc/php-fpm.conf) www-data php-fpm: pool www www-data php-fpm: pool www Webserver works perfectly as well. BUG: I heard somewhere that running PHP-FPM as a root could be potentially not good for security, so I decided to try to launch master process as www-data user: su -c "php-fpm &" -s /bin/sh www-data But, it returns an error: ERROR: failed to open error_log (/usr/local/var/log/php-fpm.log): Permission denied (13) ERROR: failed to post process the configuration ERROR: FPM initialization failed I have tried to change permissions of php-fpm.log file and /usr/local/var/log folder, even to 777, also tried various owners with chmod command ( my current user, www-data, root, etc ) But, that does not eliminate an error ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=67445&edit=1

« previous php.doc.bugs (#11284) next »