which user is Apache2

I want to set up an include file (php) outside the directory tree
- done
I want to limit access to the file to the php module under Apache2.

Who should I set the user/group to ?

I have played with it and can give you a list of users to NOT set
it to :-)



Re: which user is Apache2

By Matthew Sturdy at 11/16/2014 - 10:01


Normally it runs as www-data, but you should be able to check that with ps
and grep:

ps aux | grep apache

Will give you a list of the apache processes and the apache user should be
in the left hand column.

Good luck!

Re: which user is Apache2

By bill at 11/16/2014 - 12:10

On 11/16/2014 9:01 AM, Matthew Sturdy wrote:

Re: which user is Apache2

By Tim Dunphy at 11/16/2014 - 13:36

Also, consider that depending on the shop the Apache user and group can be changed. For instance my shop likes to use "nobody".

So ps -ef | grep -i apache is one way.

Another easy way is

egrep -i "user|group" /etc/apache2/conf/httpd.conf


Sent from my iPhone