When I do ps -aux, why do I have one copy of httpd running as root and the rest as apache?

ps -aux | grep httpd
Warning: bad syntax, perhaps a bogus '-'? See /usr/share/doc/procps-3.2.8/FAQ
root      2820  0.0  1.1 126740 13372 ?        Ss   10:23   0:00 /usr/sbin/httpd
apache    2822  0.0  0.5 126804  6456 ?        S    10:23   0:00 /usr/sbin/httpd
apache    2823  0.0  0.5 126804  6456 ?        S    10:23   0:00 /usr/sbin/httpd
apache    2824  0.0  0.5 126804  6456 ?        S    10:23   0:00 /usr/sbin/httpd
apache    2825  0.0  0.5 126804  6460 ?        S    10:23   0:00 /usr/sbin/httpd
apache    2826  0.0  0.5 126804  6460 ?        S    10:23   0:00 /usr/sbin/httpd
apache    2827  0.0  0.5 126740  6272 ?        S    10:23   0:00 /usr/sbin/httpd
apache    2828  0.0  0.5 126740  6276 ?        S    10:23   0:00 /usr/sbin/httpd
apache    2829  0.0  0.5 126740  6276 ?        S    10:23   0:00 /usr/sbin/httpd
root      3505  0.0  0.0   5460   744 pts/0    R+   11:27   0:00 grep httpd
link|improve this question

55% accept rate
feedback

1 Answer

up vote 4 down vote accepted

Because your Apache configuration includes:

User apache

Apache needs to be root in order to bind to low-numbered ports (such as 80 and 443). Once the port is open, Apache changes to a less-privileged user in order to limit access to your system in the event of a security compromise.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.