php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #67445 cannot run PHP-FPM master process by www-data user
Submitted: 2014-06-14 23:53 UTC Modified: 2014-06-15 14:14 UTC
Votes:2
Avg. Score:3.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: multitor4 at gmail dot com Assigned:
Status: Not a bug Package: Unknown/Other Function
PHP Version: 5.5.13 OS: Debian
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: multitor4 at gmail dot com
New email:
PHP Version: OS:

 

 [2014-06-14 23:53 UTC] 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


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2014-06-15 12:25 UTC] multitor4 at gmail dot com
-Status: Open +Status: Closed -Type: Bug +Type: Documentation Problem -Package: FPM related +Package: Unknown/Other Function
 [2014-06-15 12:25 UTC] multitor4 at gmail dot com
My mistake
 [2014-06-15 14:14 UTC] sobak@php.net
-Status: Closed +Status: Not a bug
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Thu Oct 08 01:00:01 2026 UTC