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.
This commit is contained in:
Antony Messerli 2025-06-12 00:42:02 -05:00 committed by GitHub
parent ca7a3390c2
commit 4c5e9d6676
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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 \