Skip to content

Fix /workspaces permissions so the node user can clone repos - #30

Closed
bmorton with Copilot wants to merge 1 commit into
mainfrom
copilot/fix-permissions-issue
Closed

bmorton with Copilot wants to merge 1 commit into
mainfrom
copilot/fix-permissions-issue

Conversation

Copilot AI commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

Cloning into /workspaces failed for the non-root node user because the base image creates the directory as root and envbuilder (Coder) does not chown it to the target user:

node ➜ /workspaces $ git clone git@github.com:bmorton/temporal-operator.git
fatal: could not create work tree dir 'temporal-operator': Permission denied

Changes

  • .devcontainer/Dockerfile: Create /workspaces and chown it to node (before the trailing USER node) so the directory is writable on both the devcontainer CLI and envbuilder paths.
  • scripts/verify-devcontainer.sh: Add a check asserting /workspaces is writable by the current user (via a throwaway mkdir probe) to guard against regressions.
RUN mkdir -p /workspaces && chown node:node /workspaces

@bmorton

bmorton commented Oct 30, 2026

Copy link
Copy Markdown
Owner

Superseded by #39, which includes the /workspaces chown and the verify-script writability check from this PR.

@bmorton bmorton closed this Oct 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants