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.

In the command line if I do this:

ps -u root | less

one of the lines is this

19974 ?        00:00:01 httpd

is this safe, to have the main httpd process as running as root? if i do this : 'ps auxf | less' it looks like it spawns sub processes

share|improve this question
add comment

4 Answers

up vote 4 down vote accepted

Not only is it safe, it's required if you want to run on port 80. Per the docs:

If the Listen specified in the configuration file is default of 80 (or any other port below 1024), then it is necessary to have root privileges in order to start apache, so that it can bind to this privileged port.

share|improve this answer
add comment

httpd has to initially run as root, so yes, this is fine as long as you have a bunch of httpd process that are not running as root.

share|improve this answer
add comment

Yes. Apache, more specifically the parent process, needs to run as root to allow it to listen on the privilaged port 80

share|improve this answer
add comment

Due to its "nature", httpd normally would use port 80.

Only root can bind ports <1024 to any process.

You'll find this behaviour on other processes as well, e.g. services which uses udp & tcp-ports below 1024

share|improve this answer
add comment

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.