2023-03-20 02:56:52 -04:00
|
|
|
#!/command/with-contenv bash
|
|
|
|
# shellcheck shell=bash
|
|
|
|
|
|
|
|
set -e
|
2023-05-03 02:01:27 -04:00
|
|
|
# verbose
|
|
|
|
set -x
|
2023-03-20 02:56:52 -04:00
|
|
|
|
|
|
|
log_info 'Setting ownership ...'
|
|
|
|
|
|
|
|
# root
|
|
|
|
chown root /tmp/nginx
|
|
|
|
|
|
|
|
# npmuser
|
2023-05-03 18:27:38 -04:00
|
|
|
chown -R "$PUID:$PGID" /data
|
|
|
|
chown -R "$PUID:$PGID" /etc/letsencrypt
|
|
|
|
chown -R "$PUID:$PGID" /run/nginx
|
|
|
|
chown -R "$PUID:$PGID" /tmp/nginx
|
|
|
|
chown -R "$PUID:$PGID" /var/cache/nginx
|
|
|
|
chown -R "$PUID:$PGID" /var/lib/logrotate
|
|
|
|
chown -R "$PUID:$PGID" /var/lib/nginx
|
|
|
|
chown -R "$PUID:$PGID" /var/log/nginx
|
2023-03-27 20:39:26 -04:00
|
|
|
|
|
|
|
# Don't chown entire /etc/nginx folder as this causes crashes on some systems
|
2023-05-03 18:27:38 -04:00
|
|
|
chown -R "$PUID:$PGID" /etc/nginx/nginx
|
|
|
|
chown -R "$PUID:$PGID" /etc/nginx/nginx.conf
|
|
|
|
chown -R "$PUID:$PGID" /etc/nginx/conf.d
|