[BUG] Sandbox directory /tmp/claude causes permission conflicts for multi-user systems
Resolved 💬 4 comments Opened Jan 23, 2026 by theHausdorffMetric Closed Mar 1, 2026
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
When multiple users on the same Linux machine use Claude Code, they encounter permission conflicts because the sandbox directory /tmp/claude is created by the first user and is not writable by other users.
What Should Happen?
Claude Code should handle multi-user environments gracefully. Possible solutions:
- Use user-specific sandbox directories: e.g.,
/tmp/claude-$USERor
/tmp/claude/$USER
- Create /tmp/claude with 1777 permissions (sticky bit, like /tmp itself)
- Use XDG_RUNTIME_DIR: This is already per-user on most Linux systems
- Fall back gracefully: If the shared directory isn't writable, use an alternative
location
Error Messages/Logs
Bash(cargo build --release 2>&1) timeout: 5m 0s
⎿ Error: EACCES: permission denied, mkdir
'/tmp/claude/-home-dp-claude-dev-dpdev-ideas-agentic-rag'
Steps to Reproduce
- User A runs Claude Code on a shared Linux machine
- Claude Code creates
/tmp/claudeowned by User A - User B runs Claude Code on the same machine
- User B's Claude Code attempts to create a subdirectory under
/tmp/claude - Build fails with:
EACCES: permission denied, mkdir '/tmp/claude/-home-user-b-project'
Claude Model
Opus
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.1.17 (Claude Code)
Platform
Anthropic API
Operating System
Ubuntu/Debian Linux
Terminal/Shell
Other
Additional Information
_No response_
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗