From e632e93f473e97b7dd3d40172689166c9b972e5c Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Thu, 31 Jul 2025 15:41:12 +0200 Subject: [PATCH] skip permissions --- plex/rootfs/etc/cont-init.d/90-create_links.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/plex/rootfs/etc/cont-init.d/90-create_links.sh b/plex/rootfs/etc/cont-init.d/90-create_links.sh index a172ba153..0c26092dc 100755 --- a/plex/rootfs/etc/cont-init.d/90-create_links.sh +++ b/plex/rootfs/etc/cont-init.d/90-create_links.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bashio ################## # SYMLINK CONFIG # @@ -20,6 +20,8 @@ else echo "Using existing config" fi -chown -R "$PUID:$PGID" /config/Library -chown -R "$PUID:$PGID" /share/plex -chmod -R 777 /share/plex +# Adapt permissions if needed +if ! bashio::config.true "skip_permissions_check" && [ "${PUID:-0}" != "0" ] && [ "${PGID:-0}" != "0" ]; then + chown -R "$PUID:$PGID" /share/plex + chmod -R 777 /share/plex +fi