Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 275164

Summary: www-servers/nginx - init script bug(?) - /var/tmp/nginx
Product: Gentoo Linux Reporter: Piotr Karbowski (RETIRED) <slashbeast>
Component: New packagesAssignee: Konstantin Arkhipov (RETIRED) <voxus>
Status: RESOLVED WONTFIX    
Severity: minor    
Priority: High    
Version: unspecified   
Hardware: All   
OS: All   
Whiteboard:
Package list:
Runtime testing required: ---

Description Piotr Karbowski (RETIRED) gentoo-dev 2009-06-23 10:54:06 UTC
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
Comment 1 Wormo (RETIRED) gentoo-dev 2009-06-27 07:25:03 UTC
Thanks for posting your init script modification. Assigning this suggestion to nginx maintainer for review.
Comment 2 Johan Bergström 2009-11-12 13:54:37 UTC
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. 
Comment 3 Dirkjan Ochtman (RETIRED) gentoo-dev 2010-01-03 20:06:02 UTC
I agree with comment #2 that this is something you have to deal with in your own setup. WONTFIXing.