From e72657b53ec8258733f001dbafdc04872c1c5c6c Mon Sep 17 00:00:00 2001 From: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com> Date: Mon, 24 Aug 2026 10:01:38 -0500 Subject: [PATCH] re-own the nginx shm cache on service restart --- docker/main/rootfs/etc/s6-overlay/s6-rc.d/nginx/run | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docker/main/rootfs/etc/s6-overlay/s6-rc.d/nginx/run b/docker/main/rootfs/etc/s6-overlay/s6-rc.d/nginx/run index 8e53d2127a..83a292c71c 100755 --- a/docker/main/rootfs/etc/s6-overlay/s6-rc.d/nginx/run +++ b/docker/main/rootfs/etc/s6-overlay/s6-rc.d/nginx/run @@ -100,6 +100,11 @@ echo "$nginx_settings" | \ if [[ "$(id -u)" -eq 0 && "${FRIGATE_RUN_AS_ROOT:-false}" != "true" ]]; then chown -R frigate:frigate /tmp/nginx + # heal the cache if a root `nginx -t` chowned it (ngx_create_paths chowns + # every cycle path to the `user` directive user when run as root) + if [ -d /dev/shm/nginx_cache ]; then + chown -R frigate:frigate /dev/shm/nginx_cache + fi # error_log/access_log /dev/stdout make nginx REOPEN the s6 log pipe by # path, and s6 created it root-owned 0600; without this the non-root # master exits with "open() /dev/stdout failed (13: Permission denied)"