On my boxes /var/tmp is link to /tmp, /tmp is tmpfs so after reboot it is clean (empty), nginx can create /var/tmp/nginx/* but not /var/tmp/nginx so I hack init script to do it configtest() { ebegin "Checking nginx' configuration" /usr/sbin/nginx -c /etc/nginx/nginx.conf -t #Test if /var/tmp/nginx exist. /usr/bin/test -d /var/tmp/nginx || /bin/mkdir /var/tmp/nginx /usr/bin/test -d /var/tmp/nginx && /bin/chmod 770 /var/tmp/nginx /usr/bin/test -d /var/tmp/nginx && /bin/chown nginx:nginx /var/tmp/nginx eend $? "failed, please correct errors above" } Also - chmod - after merging nginx it making /var/tmp/nginx dir but why with 755 perms? My umask is 077. //Sorry about my english/// Reproducible: Always
Thanks for posting your init script modification. Assigning this suggestion to nginx maintainer for review.
I'm not sure this is the right scope to solve these issues. I can image that an empty directory structure would involve more similar issues, and therefore should probably be bundled together in your 'own' init script.
I agree with comment #2 that this is something you have to deal with in your own setup. WONTFIXing.