1
2
3
4
5
6
7
8
9
10
11 | --- a/src/os/unix/ngx_process_cycle.c +++ b/src/os/unix/ngx_process_cycle.c @@ -853,7 +853,7 @@ } #endif - if (geteuid() == 0) { + if (ccf->user != 0 && geteuid() == 0) { if (setgid(ccf->group) == -1) { ngx_log_error(NGX_LOG_EMERG, cycle->log, ngx_errno, "setgid(%d) failed", ccf->group); |