1

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

Stojko
  • 63

1 Answers1

4

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".

cjc
  • 25,492