How do I figure out what user & group Apache is running as?

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-01 05:28:52

Actually, you don't need access to httpd.conf:

ps aux | grep apache2
groups apache_user

should yield what You want

I was having some issue that leads me to another solution. But it only works when you have access to the configuration file

We can actually check the user and group in \etc\apache2\envars file. This is where Apache set the environments var and use it across application.

Look for this two lines:

export APACHE_RUN_USER=www-data
export APACHE_RUN_GROUP=www-data

Note this is just setting environment variables. The actual setting the apache to run as what user/group is actually in the \etc\apache2\apache2.conf

User ${APACHE_RUN_USER}
Group ${APACHE_RUN_GROUP}

The location of the files might me different but you should get the idea.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!