2023-03-20 02:56:52 -04:00
|
|
|
#!/command/with-contenv bash
|
|
|
|
# shellcheck shell=bash
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
log_info 'Setting ownership ...'
|
|
|
|
|
|
|
|
# root
|
|
|
|
chown root /tmp/nginx
|
|
|
|
|
2023-05-03 20:03:06 -04:00
|
|
|
# npm user and group
|
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
|
2023-05-10 00:39:08 -04:00
|
|
|
|
|
|
|
# Prevents errors when installing python certbot plugins when non-root
|
2024-01-17 21:26:55 -05:00
|
|
|
chown "$PUID:$PGID" /opt/certbot /opt/certbot/bin
|
2024-01-09 18:32:12 -05:00
|
|
|
chown -R "$PUID:$PGID" /opt/certbot/lib/python*/site-packages
|