mirror of
https://github.com/AutoMaker-Org/automaker.git
synced 2026-01-30 06:12:03 +00:00
fix: ensure npm cache directory has correct permissions
Fix EACCES permission error when running npx commands (e.g., MCP servers) inside the Docker container. Error that was occurring: npm error code EACCES npm error syscall mkdir npm error path /home/automaker/.npm/_cacache/index-v5/1f/fc npm error errno EACCES npm error Your cache folder contains root-owned files, due to a bug in npm error previous versions of npm which has since been addressed. The fix ensures the /home/automaker/.npm directory exists and has correct ownership before switching to the automaker user in the entrypoint script.
This commit is contained in:
@@ -47,6 +47,13 @@ fi
|
||||
chown -R automaker:automaker /home/automaker/.cache/opencode
|
||||
chmod -R 700 /home/automaker/.cache/opencode
|
||||
|
||||
# Ensure npm cache directory exists with correct permissions
|
||||
# This is needed for using npx to run MCP servers
|
||||
if [ ! -d "/home/automaker/.npm" ]; then
|
||||
mkdir -p /home/automaker/.npm
|
||||
fi
|
||||
chown -R automaker:automaker /home/automaker/.npm
|
||||
|
||||
# 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
|
||||
# The env var CURSOR_AUTH_TOKEN is also checked directly by cursor-agent
|
||||
|
||||
Reference in New Issue
Block a user