www-server/nginx: revbump tmpfiles: /var/tmp/nginx -> /var/cache/nginx

In contrast to /var/tmp, /var/cache is only writable by root, so it
should be more foolproof against possible exploitation.

As previously, the cache directory's permissions is adjusted every time
this tmpfiles.d config is read.

This new config deviates from the previous one's behaviour by only
cleaning /var/cache/nginx boot to not prune the temporary files of the
running NGINX instance (e.g. on upgrade), if there is one running.

Bug: https://bugs.gentoo.org/962961
Signed-off-by: Zurab Kvachadze <zurabid2016@gmail.com>
Part-of: https://github.com/gentoo/gentoo/pull/43823
Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
Zurab Kvachadze
2025-10-03 05:51:32 +01:00
committed by Sam James
parent 4f0fa8f173
commit 922d60f305
@@ -0,0 +1,4 @@
d /var/cache/nginx 0755 root root
# Clean up the cache only on boot to not break running NGINX
e! /var/cache/nginx/ - - - 0