问题描述
我的服务器似乎尽管设置为www数据中运行的Apache2作为root的/ etc / apache2的/ envvars中。
怎么能这样呢?
-
在/ etc / apache2的/ envvars中
出口APACHE_RUN_USER = www数据
出口APACHE_RUN_GROUP = www数据 -
下面是我如何检查它
How做我找出用户的放大器;组Apache是运行的?
PS AXO用户,组,通讯| grep的阿帕奇
根根的Apache2
根根的Apache2
根根的Apache2
根根的Apache2
根根的Apache2
根根的Apache2
根根的Apache2
我觉得APACHE_RUN_USER应该是Apache2的用来读,写,或在您的网站上执行文件的用户。这并不是说运行的Apache2服务器的用户。你不希望运行的网页为根服务器,因为文件,您可能希望保留用户访问会变得可见。我可能是错的。尝试运行服务的Apache2重启,并再次检查。
My server seems to run apache2 as root despite set to www-data in /etc/apache2/envvars.
How can this happen ?
/etc/apache2/envvars
export APACHE_RUN_USER=www-dataexport APACHE_RUN_GROUP=www-data
Here is how I checked it
How do I figure out what user & group Apache is running as?
ps axo user,group,comm | grep apache
root root apache2
root root apache2
root root apache2
root root apache2
root root apache2
root root apache2
root root apache2
I think that APACHE_RUN_USER is supposed to be the user that apache2 uses to read, write, or execute the files in your website. Not the user that runs the apache2 server. You wouldn't want your server running webpages as root, because files you may want to keep the user from accessing will become visible. I may be wrong though. Try running service apache2 restart, and checking again.
这篇关于运行的Apache2根尽管envvars中定义为www数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!