运行的Apache2根尽管envvars中定义为www数据 [英] apache2 running root despite defined to www-data in envvars

查看:530
本文介绍了运行的Apache2根尽管envvars中定义为www数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的服务器似乎尽管设置为www数据中运行的Apache2作为root的/ etc / apache2的/ envvars中。

怎么能这样呢?


  • 在/ etc / apache2的/ envvars中

    出口APACHE_RUN_USER = www数据
    出口APACHE_RUN_GROUP = www数据


  • 下面是我如何检查它


<一个href=\"http://stackoverflow.com/questions/4317156/how-do-i-figure-out-what-user-group-apache-is-running-as\">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-data export 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数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆