Skip to content

Fix container home directory ownership for npm cache #48

@GordonBeeming

Description

@GordonBeeming

Summary

In copilot_here containers, some tools (notably npm) may fail when caches/config directories under /home/appuser are created with root ownership. We need the container entrypoint to ensure safe, non-sensitive user-home directories exist and are owned by the runtime UID/GID so tools can run reliably as appuser.

Acceptance criteria

  • On container startup, /home/appuser/.npm exists and is owned by the runtime user (PUID/PGID).
  • On container startup, /home/appuser/.config exists and is owned by the runtime user (PUID/PGID).
  • Existing behavior remains unchanged for sensitive paths (e.g., ~/.ssh, ~/.gnupg) — no automatic chown of those locations.
  • Version is bumped consistently across all required version locations.
  • dotnet build app/CopilotHere.csproj succeeds.

Notes

  • The issue was observed in a session requiring manual fix: sudo chown -R $(id -u):$(id -g) /home/appuser/.npm.
  • Keep the fix global (shared entrypoint) for now; revisit per-image setup if/when needed.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions