How can I check the user and group for the
nginx daemon in Ubuntu?
Or what's the syntax to find the user and group for a daemon running in Ubuntu?
Super User is a question and answer site for computer enthusiasts and power users. It only takes a minute to sign up.Sign up to join this community
ps while it is running:
oliver@ubuntuServer:~$ ps aux|grep nginx|grep -v grep root 17119 0.0 0.1 57492 1156 ? Ss 14:22 0:00 nginx: master process /usr/sbin/nginx www-data 17120 0.0 0.1 57804 1572 ? S 14:22 0:00 nginx: worker process www-data 17121 0.0 0.1 57804 1572 ? S 14:22 0:00 nginx: worker process www-data 17122 0.0 0.1 57804 1572 ? S 14:22 0:00 nginx: worker process www-data 17123 0.0 0.1 57804 1572 ? S 14:22 0:00 nginx: worker process
As you can see in the first column, the initial nginx master process is started with the
root user account. This process will spawn the workers under the
www-data user account. This would be the one you care about.
nginx isn't running, you can just as well pull the information from the configuration file like so:
oliver@ubuntuServer:~$ grep user /etc/nginx/nginx.conf user www-data;