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