From bd810bba44d0d7aba8af806840ce49cb35d1c02a Mon Sep 17 00:00:00 2001 From: KristjanPikhof Date: Thu, 8 Jan 2026 10:50:56 +0200 Subject: [PATCH 1/2] fix: Suppress chown errors for bind-mounted directories on macOS When using Docker Desktop on macOS with bind-mounted host directories (e.g., ~/.claude:/home/automaker/.claude), the container cannot change file ownership because Docker runs in a Linux VM using a virtualized filesystem layer (virtiofs/grpcfuse). This caused hundreds of "Permission denied" errors on container startup for users with many files in their .claude/plugins/ directories. The fix adds error suppression (2>/dev/null || true) to chown and chmod commands. Files remain readable without ownership change, so this is safe. --- docker-entrypoint.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index 017213dc4..525a86386 100755 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -14,16 +14,18 @@ if [ -n "$CLAUDE_OAUTH_CREDENTIALS" ]; then fi # Fix permissions on Claude CLI config directory -chown -R automaker:automaker /home/automaker/.claude -chmod 700 /home/automaker/.claude +# Suppress errors for bind-mounted host directories (macOS can't change ownership) +chown -R automaker:automaker /home/automaker/.claude 2>/dev/null || true +chmod 700 /home/automaker/.claude 2>/dev/null || true # Ensure Cursor CLI config directory exists with correct permissions # This handles both: mounted volumes (owned by root) and empty directories if [ ! -d "/home/automaker/.cursor" ]; then mkdir -p /home/automaker/.cursor fi -chown -R automaker:automaker /home/automaker/.cursor -chmod -R 700 /home/automaker/.cursor +# Suppress errors for bind-mounted host directories (macOS can't change ownership) +chown -R automaker:automaker /home/automaker/.cursor 2>/dev/null || true +chmod -R 700 /home/automaker/.cursor 2>/dev/null || true # If CURSOR_AUTH_TOKEN is set, write it to the cursor auth file # On Linux, cursor-agent uses ~/.config/cursor/auth.json for file-based credential storage From e5410a8d13f6787b228d2fa349eb88a37b117921 Mon Sep 17 00:00:00 2001 From: KristjanPikhof Date: Thu, 8 Jan 2026 11:57:01 +0200 Subject: [PATCH 2/2] fix: Address CodeRabbit review feedback - Add error suppression to chmod on .credentials.json (line 13) - Make chmod recursive for .claude directory for consistency (line 19) - Add error suppression to chmod/chown for .config directory (lines 42-43) All chmod/chown operations now consistently handle macOS bind mount limitations where permission changes are not possible. --- docker-entrypoint.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index 525a86386..700d2d6b6 100755 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -10,13 +10,13 @@ fi # This allows passing OAuth tokens from host (especially macOS where they're in Keychain) if [ -n "$CLAUDE_OAUTH_CREDENTIALS" ]; then echo "$CLAUDE_OAUTH_CREDENTIALS" > /home/automaker/.claude/.credentials.json - chmod 600 /home/automaker/.claude/.credentials.json + chmod 600 /home/automaker/.claude/.credentials.json 2>/dev/null || true fi # Fix permissions on Claude CLI config directory # Suppress errors for bind-mounted host directories (macOS can't change ownership) chown -R automaker:automaker /home/automaker/.claude 2>/dev/null || true -chmod 700 /home/automaker/.claude 2>/dev/null || true +chmod -R 700 /home/automaker/.claude 2>/dev/null || true # Ensure Cursor CLI config directory exists with correct permissions # This handles both: mounted volumes (owned by root) and empty directories @@ -39,8 +39,8 @@ if [ -n "$CURSOR_AUTH_TOKEN" ]; then "accessToken": "$CURSOR_AUTH_TOKEN" } EOF - chmod 600 "$CURSOR_CONFIG_DIR/auth.json" - chown -R automaker:automaker /home/automaker/.config + chmod 600 "$CURSOR_CONFIG_DIR/auth.json" 2>/dev/null || true + chown -R automaker:automaker /home/automaker/.config 2>/dev/null || true fi # Switch to automaker user and execute the command