Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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
share|improve this question

1 Answer 1

up vote 5 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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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