Log file permissions

Henrik Vendelbo hvendelbo.dev at googlemail.com
Fri May 30 14:29:19 MSD 2008


I am quite stuck trying to set up access/error logging for nginx.

nobody   17992   0.0  0.1    76872   1144   ??  S    12:20am   0:00.00
nginx: worker process
nobody   17991   0.0  0.1    76872   1140   ??  S    12:20am   0:00.00
nginx: worker process
root     17990   0.0  0.0    76072    232   ??  Ss   12:20am   0:00.00
nginx: master process /opt/local/sbin/nginx

$ ls -al /var/log/testin2.local/
total 0
drwxrwxr-x   3 root  nobody   102 30 May 00:17 .
drwxr-xr-x  85 root  wheel   2890 30 May 00:00 ..
-rwxrwx---   1 root  nobody  5496 30 May 00:21 www.access.log


I run nginx as nobody:nobody, and group nobody should have write
access to the log file, even so it fails with this message:

30/05/2008 11:27:15 org.macports.nginx[20671] 2008/05/30 11:27:14
[emerg] 20672#0: open() "/var/log/testin2.local/www.access.log" failed
(13: Permission denied)
30/05/2008 11:27:45 com.apple.launchd[112] (org.macports.nginx[20671])
Exited with exit code: 2

Is it expecting the user to have the write permissions?

Henrik





More information about the nginx mailing list