From 7e47d8d9fab6818e05fabd17b4b5eeacca99493f Mon Sep 17 00:00:00 2001 From: {Suksham-sharma} Date: Thu, 29 Jan 2026 01:33:31 +0530 Subject: [PATCH] fix(docker): set directory ownership for container user Add chown commands to set ownership of mounted directories to uid 1000 (the container's node user). This allows the container to write to the mounted volumes when the host directories are owned by root. Uses || true to avoid failing when run by non-root users. --- docker-setup.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docker-setup.sh b/docker-setup.sh index 0f7571e96..d56b24177 100755 --- a/docker-setup.sh +++ b/docker-setup.sh @@ -26,6 +26,10 @@ mkdir -p "${CLAWDBOT_WORKSPACE_DIR:-$HOME/clawd}" export CLAWDBOT_CONFIG_DIR="${CLAWDBOT_CONFIG_DIR:-$HOME/.clawdbot}" export CLAWDBOT_WORKSPACE_DIR="${CLAWDBOT_WORKSPACE_DIR:-$HOME/clawd}" + +# Set ownership to container user (uid 1000) so the container can write to mounted volumes +chown -R 1000:1000 "$CLAWDBOT_CONFIG_DIR" 2>/dev/null || true +chown -R 1000:1000 "$CLAWDBOT_WORKSPACE_DIR" 2>/dev/null || true export CLAWDBOT_GATEWAY_PORT="${CLAWDBOT_GATEWAY_PORT:-18789}" export CLAWDBOT_BRIDGE_PORT="${CLAWDBOT_BRIDGE_PORT:-18790}" export CLAWDBOT_GATEWAY_BIND="${CLAWDBOT_GATEWAY_BIND:-lan}"