Commit a932c5e
fix: make workspace writable for non-root agent containers
The API process runs as root and creates workspace files (CLAUDE.md,
sub-agent configs) with root:root ownership and 0755/0644 permissions.
When the agent container starts as the non-root agentcrew user (uid 999),
it cannot write to the bind-mounted workspace, causing "permission denied"
errors for .claude dir creation and MCP config writes.
Add makeWorkspaceWritable() that recursively sets 0777/0666 permissions
on the workspace directory before mounting it into the agent container.
This ensures the container user can write regardless of UID mismatch.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent 4e98ca7 commit a932c5e
2 files changed
+30
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
479 | 479 | | |
480 | 480 | | |
481 | 481 | | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
482 | 495 | | |
483 | 496 | | |
484 | 497 | | |
| |||
702 | 715 | | |
703 | 716 | | |
704 | 717 | | |
| 718 | + | |
| 719 | + | |
| 720 | + | |
| 721 | + | |
| 722 | + | |
| 723 | + | |
| 724 | + | |
| 725 | + | |
| 726 | + | |
| 727 | + | |
| 728 | + | |
| 729 | + | |
| 730 | + | |
| 731 | + | |
| 732 | + | |
| 733 | + | |
705 | 734 | | |
706 | 735 | | |
707 | 736 | | |
| |||
0 commit comments