From 115112552bbe3bffd5cd6a27a1fa2ad06f61c77f Mon Sep 17 00:00:00 2001 From: wander Date: Fri, 6 Feb 2026 23:45:30 -0500 Subject: [PATCH] attempt to make this work for podman and docker --- assets/entrypoint.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/assets/entrypoint.sh b/assets/entrypoint.sh index 5d2aff0..d924a65 100755 --- a/assets/entrypoint.sh +++ b/assets/entrypoint.sh @@ -122,7 +122,15 @@ fi # 4. Ownership Fix (Crucial for Docker volumes) mkdir -p "$DATA_DIR/hidden_service/" -chown -R tor:root "$DATA_DIR" +# Ensure the current user owns the data directory (Fix for Podman/Docker permission mismatch) +if [ "$(id -u)" = "0" ]; then + chown -R tor:root "$DATA_DIR" +else + # Non-root (e.g. Podman rootless or user:1000), we just hope we have write access + # or that the volume was mounted with correct permissions. + # But let's try to be helpful if we are root-ish. + : +fi chmod 700 "$DATA_DIR" chmod 700 "$DATA_DIR/hidden_service/"