Mailing List Archive

[6840] wizards2/wizards/php-fpm.py: php-fpm should most likely be launched as root.
Revision: 6840
http://svn.cherokee-project.com/changeset/6840
Author: alo
Date: 2011-09-06 22:02:59 +0200 (Tue, 06 Sep 2011)
Log Message:
-----------
php-fpm should most likely be launched as root.

Modified Paths:
--------------
wizards2/wizards/php-fpm.py

Modified: wizards2/wizards/php-fpm.py
===================================================================
--- wizards2/wizards/php-fpm.py 2011-09-06 18:07:36 UTC (rev 6839)
+++ wizards2/wizards/php-fpm.py 2011-09-06 20:02:59 UTC (rev 6840)
@@ -127,16 +127,14 @@
CTK.cfg['%s!host' %(next)] = host
CTK.cfg['%s!interpreter' %(next)] = '%(php_bin)s --fpm-config %(conf_file)s' %(locals())

- web_user = CTK.cfg.get_val ('server!user', str(os.getuid()))
- web_group = CTK.cfg.get_val ('server!group', str(os.getgid()))
- php_user = fpm_info.get ('user', web_user)
- php_group = fpm_info.get ('group', web_group)
+ # Launch as root: php-fpm must be launched as root, so it
+ # can keep the log file save. It will drop its privileges
+ # according to its configuration file.
+ #
+ php_user = fpm_info.get ('user')
+ php_group = fpm_info.get ('group')

- if php_user != web_user or php_group != web_group:
-
- # In case FPM has specific UID/GID and differs from
- # Cherokee's, the interpreter must by spawned by root.
- #
+ if php_user or php_group:
root_user = 0 # TODO
root_group = 0 # TODO