2023-03-20 06:56:52 +00:00
|
|
|
#!/command/with-contenv bash
|
|
|
|
# shellcheck shell=bash
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
log_info 'Setting ownership ...'
|
|
|
|
|
|
|
|
# root
|
|
|
|
chown root /tmp/nginx
|
|
|
|
|
2023-05-04 00:03:06 +00:00
|
|
|
# npm user and group
|
2023-05-03 22:27:38 +00: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-28 00:39:26 +00:00
|
|
|
|
|
|
|
# Don't chown entire /etc/nginx folder as this causes crashes on some systems
|
2023-05-03 22:27:38 +00:00
|
|
|
chown -R "$PUID:$PGID" /etc/nginx/nginx
|
|
|
|
chown -R "$PUID:$PGID" /etc/nginx/nginx.conf
|
|
|
|
chown -R "$PUID:$PGID" /etc/nginx/conf.d
|