Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I compiled Nginx from sources.

In the configuration file, I set up Nginx to be ran as nobody user.

However, the output of the ps aux is as following:

root      1691  0.0  0.0  27872   948 ?        Ss   11:28   0:00 nginx: master process /usr/bin/nginx -c /etc/nginx/nginx.conf
nobody    1692  0.0  0.0  28284  1852 ?        S    11:28   0:00 nginx: worker process

As you can see, master process is being ran as root user.

Is there everything ok with the configuration?

Cheers, Stojko

share|improve this question
up vote 3 down vote accepted

Yes, it's fine. That's how it's supposed to work: the master process does the bind to the privileged port 80. The worker processes are spawned by the master the handle actual HTTP requests, and then drop privileges (to user "nobody" in your case). Web documents (and directories) will need to be accessible by user "nobody".

share|improve this answer
Thanks. This is exactly as I thought, just needed advanced user confirmation :) Thanks for your input. – Stojko Apr 22 '12 at 12:20
Just to note, Apache works the same way (a master process running as root that binds to port 80, and non-root worker processes that serve the actual HTTP requests):… – cjc Apr 22 '12 at 12:25
All ports under 1024 requires root privileges, am I right? I've marked your answer as correct. – Stojko Apr 22 '12 at 12:29
Yes, ports under 1024 require root privs to bind to them. – cjc Apr 22 '12 at 12:30
Thanks for the confirmation once again :-) – Stojko Apr 22 '12 at 12:33

Your Answer


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.