[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:

  1. Use user-specific sandbox directories: e.g., /tmp/claude-$USER or

/tmp/claude/$USER

  1. Create /tmp/claude with 1777 permissions (sticky bit, like /tmp itself)
  2. Use XDG_RUNTIME_DIR: This is already per-user on most Linux systems
  3. 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

  1. User A runs Claude Code on a shared Linux machine
  2. Claude Code creates /tmp/claude owned by User A
  3. User B runs Claude Code on the same machine
  4. User B's Claude Code attempts to create a subdirectory under /tmp/claude
  5. 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_

View original on GitHub ↗

This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗