claude-code - 💡(How to fix) Fix [BUG] Remote SSH sessions fail with EACCES on shared Linux host — /tmp/claude-settings-<static-hash>.json collision between users [1 participants]

Official PRs (…)
ON THIS PAGE

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#52111Fetched 2026-04-23 07:36:21
View on GitHub
Comments
0
Participants
1
Timeline
5
Reactions
0
Participants
Timeline (top)
labeled ×5

Error Message

Error Messages/Logs

[RemoteProcess:...] stderr: Error processing settings: EACCES: permission denied, open '/tmp/claude-settings-44136fa355b3678a.json' [error] Sentry caught: { value: 'Claude Code process exited with code 1', ... }

Root Cause

Root cause: The hash 44136fa355b3678a is the MD5 of an empty string, suggesting settings content is being hashed on null/empty input rather than scoped per user or session.

Fix Action

Fix / Workaround

Workaround: The user who owns the file manually deletes it. This only unblocks the other user until the next Desktop session recreates it.

Code Example

From Desktop ssh.log:

[RemoteProcess:...] Spawning: /home/user-b/.claude/remote/ccd-cli/2.1.111 --output-format stream-json --verbose ...
[RemoteProcess:...] Spawn confirmed
[RemoteProcess:...] stderr: Error processing settings: EACCES: permission denied, open '/tmp/claude-settings-44136fa355b3678a.json'
[RemoteProcess:...] Exited, code=1, duration=340ms

From Desktop main.log:

[CCD CycleHealth] unhealthy cycle for local_... (0s, hadFirstResponse=false, reason=no_response)
[error] Sentry caught: { value: 'Claude Code process exited with code 1', ... }

Server-side:

$ ls -la /tmp/claude-settings-44136fa355b3678a.json
-rw-rw-r-- 1 user-a user-a 2 Apr 22 16:05 /tmp/claude-settings-44136fa355b3678a.json
$ whoami
user-b
$ rm /tmp/claude-settings-44136fa355b3678a.json
rm: cannot remove '/tmp/claude-settings-44136fa355b3678a.json': Operation not permitted
RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • I am using the latest version of Claude Code

What's Wrong?

Claude Desktop for Windows writes /tmp/claude-settings-44136fa355b3678a.json on the remote Linux host using a static, user-agnostic filename (the hash 44136fa355b3678a is the MD5 of an empty string). On multi-user Linux servers with sticky-bit /tmp (mode 1777), the second user to start a remote SSH Desktop session gets EACCES: permission denied trying to open that file, and Claude Code exits with code 1, blocking them indefinitely.

What Should Happen?

Each user's remote Desktop session should write its settings file to a user-scoped path (e.g. including $USER, $UID, or a session UUID in the filename, or using $XDG_RUNTIME_DIR / ~/.claude/remote/). Multiple users on the same Linux host must be able to run concurrent remote sessions without file-ownership conflicts.

Error Messages/Logs

From Desktop ssh.log:

[RemoteProcess:...] Spawning: /home/user-b/.claude/remote/ccd-cli/2.1.111 --output-format stream-json --verbose ...
[RemoteProcess:...] Spawn confirmed
[RemoteProcess:...] stderr: Error processing settings: EACCES: permission denied, open '/tmp/claude-settings-44136fa355b3678a.json'
[RemoteProcess:...] Exited, code=1, duration=340ms

From Desktop main.log:

[CCD CycleHealth] unhealthy cycle for local_... (0s, hadFirstResponse=false, reason=no_response)
[error] Sentry caught: { value: 'Claude Code process exited with code 1', ... }

Server-side:

$ ls -la /tmp/claude-settings-44136fa355b3678a.json
-rw-rw-r-- 1 user-a user-a 2 Apr 22 16:05 /tmp/claude-settings-44136fa355b3678a.json
$ whoami
user-b
$ rm /tmp/claude-settings-44136fa355b3678a.json
rm: cannot remove '/tmp/claude-settings-44136fa355b3678a.json': Operation not permitted

Steps to Reproduce

  1. Have two separate Linux users (e.g. jake, harry) on the same server with a standard sticky-bit /tmp (mode 1777).
  2. User A opens Claude Desktop for Windows on their machine and starts a remote SSH session to user-a@host.
  3. Observe that the remote process creates /tmp/claude-settings-44136fa355b3678a.json owned by user-a (mode 664).
  4. User B opens Claude Desktop for Windows on a different machine and starts a remote SSH session to user-b@host (same server).
  5. User B's session fails immediately with EACCES: permission denied on that same file and Claude Code exits with code 1.
  6. On the server, confirm as user-b: rm /tmp/claude-settings-44136fa355b3678a.json returns "Operation not permitted".

Claude Model

None

Is this a regression?

Yes, this worked in a previous version

Last Working Version

Pre-v1.3883.0.0 (before April 14, 2026 Desktop redesign; exact prior build unknown)

Claude Code Version

2.1.111 (deployed by Desktop) / 2.1.117 (user's own install)

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

Other

Additional Information

Terminal/Shell: Remote shell is bash (default on Ubuntu 24.04). No terminal emulator in use client-side — Desktop app spawns the remote process directly via its own SSH implementation (claude-ssh binary, sha1: 9a871e263f5ad97516c97c8c8129f94990635ae7, built 2026-04-21).

Environment:

  • Client: Claude Desktop for Windows v1.3883.0.0 (Microsoft Store / MSIX)
  • Server: Ubuntu 24.04 LTS (x86_64) on Hetzner VPS
  • /tmp permissions: drwxrwxrwt (standard sticky-bit, unmodified)
  • Two users (jake, harry) on separate Windows machines, same Linux server

Root cause: The hash 44136fa355b3678a is the MD5 of an empty string, suggesting settings content is being hashed on null/empty input rather than scoped per user or session.

Workaround: The user who owns the file manually deletes it. This only unblocks the other user until the next Desktop session recreates it.

Suggested fixes:

  1. Include $USER, $UID, or a session UUID in the filename hash input
  2. Write to $XDG_RUNTIME_DIR (/run/user/<uid>/) instead of /tmp
  3. Write to ~/.claude/remote/ (already user-scoped)
  4. Honor $TMPDIR if set

Regression: Worked before the April 14, 2026 Desktop redesign.

Related issues (distinct — directory-based collisions, not this single-file pattern): #20139, #17034, #15700, #18342, #16914

extent analysis

TL;DR

The most likely fix is to modify the filename generation to include user-scoped information, such as $USER, $UID, or a session UUID, to prevent file ownership conflicts in multi-user environments.

Guidance

  • Verify that the issue is indeed caused by the static filename by checking the file ownership and permissions on the Linux server.
  • Consider implementing one of the suggested fixes, such as including $USER or $UID in the filename hash input, to ensure each user's settings file is written to a unique location.
  • Test the fix by having multiple users start remote SSH sessions and verify that each user's settings file is created with the correct ownership and permissions.
  • If using $XDG_RUNTIME_DIR or ~/.claude/remote/ as an alternative, ensure that the directory exists and has the correct permissions before writing the settings file.

Example

# Example of generating a user-scoped filename
filename=$(echo -n "$USER" | md5sum | cut -d' ' -f1)
settings_file="/tmp/claude-settings-$filename.json"

Notes

The provided workaround of manually deleting the file is not a reliable solution, as it only unblocks the other user until the next Desktop session recreates the file. A more robust fix is needed to prevent file ownership conflicts.

Recommendation

Apply a workaround by modifying the filename generation to include user-scoped information, such as $USER or $UID, to prevent file ownership conflicts. This is a more reliable solution than the current workaround and addresses the root cause of the issue.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix [BUG] Remote SSH sessions fail with EACCES on shared Linux host — /tmp/claude-settings-<static-hash>.json collision between users [1 participants]