From eed0ad0738230bac20ecac2c087059206d488af8 Mon Sep 17 00:00:00 2001 From: simonmcnair <101189766+simonmcnair@users.noreply.github.com> Date: Mon, 5 May 2025 10:02:02 +0100 Subject: [PATCH] Update entrypoint.sh --- services/comfy/entrypoint.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/services/comfy/entrypoint.sh b/services/comfy/entrypoint.sh index f10eb66..3818002 100755 --- a/services/comfy/entrypoint.sh +++ b/services/comfy/entrypoint.sh @@ -28,6 +28,11 @@ if [ -f "/data/config/comfy/startup.sh" ]; then popd fi +# Only chown if not running as root (UID != 0) +if [ "$(id -u)" -ne 0 ]; then + chown -R "$(id -u):$(id -g)" ~ 2>/dev/null || true +fi + chown -R $PUID:$PGID ~/.cache/ chmod 776 ~/.cache/