From d456051eb3b7c49a2c5e96d04d2b1da8044f55c9 Mon Sep 17 00:00:00 2001 From: SergeantPanda Date: Sat, 18 Oct 2025 19:52:22 -0500 Subject: [PATCH] Verify /app also has the correct permissions. --- docker/init/03-init-dispatcharr.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docker/init/03-init-dispatcharr.sh b/docker/init/03-init-dispatcharr.sh index 7ca97a0a..2c769241 100644 --- a/docker/init/03-init-dispatcharr.sh +++ b/docker/init/03-init-dispatcharr.sh @@ -21,6 +21,14 @@ for dir in "${DATA_DIRS[@]}" "${APP_DIRS[@]}"; do mkdir -p "$dir" done +# Ensure /app itself is owned by PUID:PGID (needed for uwsgi socket creation) +if [ "$(id -u)" = "0" ] && [ -d "/app" ]; then + if [ "$(stat -c '%u:%g' /app)" != "$PUID:$PGID" ]; then + echo "Fixing ownership for /app (non-recursive)" + chown $PUID:$PGID /app + fi +fi + sed -i "s/NGINX_PORT/${DISPATCHARR_PORT}/g" /etc/nginx/sites-enabled/default # NOTE: mac doesn't run as root, so only manage permissions