From 4c5e9d667622851bc87a3249e98b3525cd76fe2c Mon Sep 17 00:00:00 2001 From: Antony Messerli Date: Thu, 12 Jun 2025 00:42:02 -0500 Subject: [PATCH] Fix nginx permission error for log directory access (#88) The nginx service was failing to start due to permission denied errors when trying to access /var/lib/nginx/logs/error.log. This directory is a symlink to /var/log/nginx which was owned by the nginx user instead of the nbxyz user that runs the service. Added proper ownership setup for /var/log/nginx directory to ensure nginx can write logs when running as the nbxyz user. --- root/init.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/root/init.sh b/root/init.sh index 6f2597a..b3b502f 100755 --- a/root/init.sh +++ b/root/init.sh @@ -29,6 +29,7 @@ mkdir -p \ /config/nginx/site-confs \ /config/log/nginx \ /run \ + /var/lib/nginx/logs \ /var/lib/nginx/tmp/client_body \ /var/tmp/nginx \ /var/log @@ -45,6 +46,7 @@ chown -R nbxyz:nbxyz /var/lib/nginx chown -R nbxyz:nbxyz /config/log/nginx chown -R nbxyz:nbxyz /run chown -R nbxyz:nbxyz /var/tmp/nginx +chown -R nbxyz:nbxyz /var/log/nginx # create local logs dir mkdir -p \