claude-code icon indicating copy to clipboard operation
claude-code copied to clipboard

Multi-user permission conflict with shared /tmp/claude/ directory

Open jpthor opened this issue 4 weeks ago • 1 comments

Description

When multiple users on the same machine use Claude Code, permission errors occur because the /tmp/claude/ directory is shared across all users.

Steps to Reproduce

  1. User A runs Claude Code - this creates /tmp/claude/ owned by User A
  2. Switch to User B on the same machine
  3. User B runs Claude Code and attempts any Bash command
  4. Error occurs: EACCES: permission denied, mkdir '/tmp/claude/-Users-...'

Error Message

Error: EACCES: permission denied, mkdir '/tmp/claude/-Users-userB-path-to-project/tasks'

Expected Behavior

Each user should have isolated temp directories that don't conflict with other users on the system.

Suggested Fix

Use per-user temp directories instead of a shared path:

  • $TMPDIR/claude/ (macOS sets this per-user)
  • /tmp/claude-$USER/
  • /tmp/claude/$UID/

Environment

  • OS: macOS (Darwin 24.6.0)
  • Multiple local user accounts on shared machine

Workaround

Run sudo rm -rf /tmp/claude when switching users.

jpthor avatar Jan 12 '26 10:01 jpthor

Found 2 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/12938
  2. https://github.com/anthropics/claude-code/issues/15700

This issue will be automatically closed as a duplicate in 3 days.

  • If your issue is a duplicate, please close it and 👍 the existing issue instead
  • To prevent auto-closure, add a comment or 👎 this comment

🤖 Generated with Claude Code

github-actions[bot] avatar Jan 12 '26 10:01 github-actions[bot]

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.

github-actions[bot] avatar Jan 21 '26 14:01 github-actions[bot]