nginx-0.4.1

Francois Simond curio at free.fr
Thu Sep 14 18:46:01 MSD 2006


Igor Sysoev a écrit :
> On Thu, 14 Sep 2006, Francois Simond wrote:
>
>> Igor Sysoev a ?crit :
>>> Changes with nginx 0.4.1                                         14 
>>> Sep 2006
>> Hello to the list, this is my first post here !
>>
>> I have a problem with files not owned by the running nginx process uid :
>>
>> With the default setup that comes with make install :
>>
>> http://localhost/ gives a 500 error:
>> in the log file:
>>
>> 2006/09/14 16:18:11 [crit] 8958#0: *4 open() 
>> "/usr/local/nginx/html/50x.html" failed (1: Operation not permitted), 
>> client: 127.0.0.1, server: localhost,
>> URL: "/index.html", host: "localhost"
>>
>>
>> If i chown nobody: -R html/ , 200 OK it works.
>
> What does "ls -l html/" show ?
# ls -al /usr/local/nginx/html/
total 16
drwxr-xr-x 2 root root 4096 2006-09-14 16:36 .
drwxr-xr-x 6 root root 4096 2006-09-14 16:36 ..
-rw-r--r-- 1 root root  383 2006-09-14 16:36 50x.html
-rw-r--r-- 1 root root  151 2006-09-14 16:36 index.html


# ps axu | grep nginx
root      9505  0.0  0.0  11008   460 ?        Ss   16:37   0:00 nginx: 
master process ./sbin/nginx
nobody    9506  0.0  0.0  11360  1000 ?        S    16:37   0:00 nginx: 
worker process

# su - nobody cat /usr/local/nginx/html/index.html
No directory, logging in with HOME=/
<html>
<head>
<title>Welcome to nginx!</title>
</head>
<body bgcolor="white" text="black">
<center><h1>Welcome to nginx!</h1></center>
</body>
</html>

Error 500 for the client, and in the log :
2006/09/14 16:38:15 [crit] 9506#0: *1 open() 
"/usr/local/nginx/html/50x.html" failed (1: Operation not permitted), 
client: 127.0.0.1, server: localhost, URL: "/", host: "localhost"


>
> You can override the use or/and group in nginx.conf:
>
> user  USER;
> user  USER  GROUP;
there is something strange if i set in conf :
    user  nobody;

# ./sbin/nginx
2006/09/14 16:41:23 [emerg] 9622#0: getgrnam("nobody") failed in 
/usr/local/nginx/conf/nginx.conf:2

beside that :

# id nobody
uid=65534(nobody) gid=65534(nogroup) groups=65534(nogroup)

something is different from the 0.4.0, i just re-check and with the same 
conf and permissions it respond 200 OK.

Something about the new O_NOATIME ?

-- 
 François Simond
 freelance web developer and consultant






More information about the nginx mailing list