When I run the ps -efH
command to list out all the process, I can see Apache running as root
and seems to have sub-processes running as www-data
. Here's the excerpt:
root 30117 1 0 09:10 ? 00:00:00 /usr/sbin/apache2 -k start
www-data 30119 30117 0 09:10 ? 00:00:00 /usr/sbin/apache2 -k start
www-data 30120 30117 0 09:10 ? 00:00:00 /usr/sbin/apache2 -k start
www-data 30121 30117 0 09:10 ? 00:00:00 /usr/sbin/apache2 -k start
Can I make Apache and all sub-processes run as different user apache2d:apache2d
? If so how? I read somewhere that the settings for this can be found in /etc/apache2/httpd.conf
but that file seems to be empty? Can this be accomplished by changing the owner and group of the /etc/init.d/apache2
script and then settings the setuid flag on it?