As I installed nginx 1.6.x from Debian dotdeb repository, the daemon nginx started automatically using the user ‘www-data‘. As I wanted to change this user in the configuration file /etc/nginx/nginx.conf from:
NGinX didn’t want to start any more and found the following line in the error logs:
[emerg]: getgrnam(“appuser”) failed in /etc/nginx/nginx.conf:1
I verified that the user existed in the system
uid=2001(appuser) gid=3000(apps) groups=3000(apps)
Thanks to this site I got what went wrong.
The problem was that nginx needs also the group. So I completed the line as follows and it worked.
user appuser apps;