From 93f074241d4cb810b6eaae0088edef638f775510 Mon Sep 17 00:00:00 2001 From: SergeantPanda Date: Tue, 4 Nov 2025 09:03:39 -0600 Subject: [PATCH] Bug fix/enhancement: Check if we're the owner of /data and set ownership if not. Also pre-create /data/models folder --- docker/init/03-init-dispatcharr.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/docker/init/03-init-dispatcharr.sh b/docker/init/03-init-dispatcharr.sh index 2c769241..5fbef23d 100644 --- a/docker/init/03-init-dispatcharr.sh +++ b/docker/init/03-init-dispatcharr.sh @@ -9,6 +9,7 @@ DATA_DIRS=( "/data/m3us" "/data/epgs" "/data/plugins" + "/data/models" ) APP_DIRS=( @@ -56,5 +57,11 @@ if [ "$(id -u)" = "0" ]; then chown -R postgres:postgres /data/db fi + # Fix /data directory ownership (non-recursive) + if [ -d "/data" ] && [ "$(stat -c '%u:%g' /data)" != "$PUID:$PGID" ]; then + echo "Fixing ownership for /data (non-recursive)" + chown $PUID:$PGID /data + fi + chmod +x /data fi \ No newline at end of file