User directive error
Palvelin Postmaster
postmaster at palvelin.fi
Sat Jan 26 15:35:26 UTC 2019
I’m running a standard Ubuntu 18.04, not SELinux. I’m under the assumption that my nginx master process IS being run by root.
> On 25 Jan 2019, at 19:03, Maxim Ozerov <maxozerov at i-free.com> wrote:
>
> Hm... it doesn't sound believable, but for example, you can restrict the root user with SELinux context ;)
>
>>
>> Hello!
>>
>>> Why does this error occur (Ubuntu 18.04/nginx 1.14.0)?
>>>
>>> nginx.conf:21
>>> user www-data;
>>>
>>> error.log
>>> 2019/01/24 19:07:07 [warn] 3526#3526: the "user" directive makes
>>> sense only if the master process runs with super- user privileges,
>>> ignored in /etc/nginx/nginx.conf:21
>>>
>>> # ps -axu |grep nginx
>>> root 3439 0.0 0.2 360156 9352 ? Ss 19:07 0:00 nginx: master
>>> process /usr/sbin/nginx -g daemon on; master_process > on; www-data
>>> 3441 0.1 0.5 364044 20716 ? S 19:07 0:00 nginx: worker process
>>> www-data 3442 0.2 0.5 364560 21248 ? S 19:07 0:00 nginx: worker
>>> process www-data 3443 0.0 0.3 362456 14852 ? S 19:07 0:00 nginx:
>>> cache manager process
>>
>> The error message is self explaining, your master process should be
>> run with the superuser privileges then you can specify workers’ user.
>>
>> Can you tell from my ps command output above what privileges my master process is running with now?
--
Palvelin.fi Hostmaster
postmaster at palvelin.fi
More information about the nginx
mailing list