如何以root身份运行php-fpm [英] How to run php-fpm as root
本文介绍了如何以root身份运行php-fpm的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我知道以root用户身份运行php-fpm的风险. 但是,在某些情况下,人们会需要这样做,例如电器, 访问操作系统资源,甚至用于测试目的.
I know the risks about running php-fpm as root. However there are situations where one would need to do it, like appliances, accessing operating system resources or even for testing purposes.
我试图将php-fpm.d/www.conf的用户和组更改为root 当我重新启动php-fpm进程时,它会引发错误:
I have tried to change the user and group of php-fpm.d/www.conf to root when I restart the php-fpm process it raise an error:
Starting php-fpm: [26-Jun-2014 00:39:07] ERROR: [pool www] please specify user and group other than root
[26-Jun-2014 00:39:07] ERROR: FPM initialization failed
[FAILED]
我该怎么办.有人帮忙吗?
What should I do. Anyone help?
推荐答案
请参阅:
# php-fpm --help
...
-R, --allow-to-run-as-root
Allow pool to run as root (disabled by default)
这篇关于如何以root身份运行php-fpm的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文