Permalink
Browse files

php-fpm should most likely be launched as root.

git-svn-id: svn://cherokee-project.com/wizards2@6840 5dc97367-97f1-0310-9951-d761b3857238
  • Loading branch information...
1 parent 144fbaf commit ab2b85475ec4dafb07ca8232cd10d63d61293cbe @alobbs alobbs committed Sep 6, 2011
Showing with 8 additions and 10 deletions.
  1. +8 −10 wizards/php-fpm.py
View
@@ -127,16 +127,14 @@ def Configure_Cherokee (self):
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)
-
- 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.
- #
+ # 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 or php_group:
root_user = 0 # TODO
root_group = 0 # TODO

0 comments on commit ab2b854

Please sign in to comment.