permission denied, open /.claude #4132

Closed
opened 2026-02-16 17:42:44 -05:00 by yindo · 6 comments
Owner

Originally created by @michabbb on GitHub (Jan 3, 2026).

Originally assigned to: @rekram1-node on GitHub.

Description

i installed opencode (via npm and curl, same problem) on a new host (as none-root user) - but i don´t really understad why opencode is trying to read /.claude - i would understand if opencode tries to read .claude in the same directory, but /.claude is strange....

i verfied with strace, althoug i am running opencode as user micha, it tries to read /.claude.

you can argue: .claude should exist only in /root/.claude but not in /.claude. but the point is: opencode is not usable because of this directory that belongs to root.

opencode should still work even if a none relevant folder is not accessable 😏

Image

Plugins

none, fresh install (as none-root user)

OpenCode version

1.0.223

Steps to reproduce

create a folder /.claude that belongs to root that is only readable by root
run opencode (on linux)

Screenshot and/or share link

No response

Operating System

arch linux (omarchy)

Terminal

ghostty

Originally created by @michabbb on GitHub (Jan 3, 2026). Originally assigned to: @rekram1-node on GitHub. ### Description i installed opencode (via npm and curl, same problem) on a new host (as none-root user) - but i don´t really understad why opencode is trying to read /.claude - i would understand if opencode tries to read .claude in the same directory, but /.claude is strange.... i verfied with strace, althoug i am running opencode as user micha, it tries to read /.claude. you can argue: .claude should exist only in /root/.claude but not in /.claude. but the point is: opencode is not usable because of this directory that belongs to root. opencode should still work even if a none relevant folder is not accessable 😏 <img width="537" height="171" alt="Image" src="https://github.com/user-attachments/assets/2425e992-05f1-42d2-99a3-48f75d11893b" /> ### Plugins none, fresh install (as none-root user) ### OpenCode version 1.0.223 ### Steps to reproduce create a folder /.claude that belongs to root that is only readable by root run opencode (on linux) ### Screenshot and/or share link _No response_ ### Operating System arch linux (omarchy) ### Terminal ghostty
yindo added the bug label 2026-02-16 17:42:44 -05:00
yindo closed this issue 2026-02-16 17:42:44 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Jan 3, 2026):

This issue might be a duplicate of existing issues. Please check:

  • #6551: opencode doesn't respect CLAUDE_CONFIG_DIR environment variable - discusses hardcoded ~/.claude path and related config directory issues
  • #6343: EACCES: permission denied errors when trying to create/access directories with insufficient permissions
  • #3610: OPENCODE_CONFIG_DIR broken when only world-readable - permission issues with config directory access

These issues address similar permission and configuration path problems. Feel free to ignore if your specific case differs from these.

@github-actions[bot] commented on GitHub (Jan 3, 2026): This issue might be a duplicate of existing issues. Please check: - #6551: opencode doesn't respect CLAUDE_CONFIG_DIR environment variable - discusses hardcoded ~/.claude path and related config directory issues - #6343: EACCES: permission denied errors when trying to create/access directories with insufficient permissions - #3610: OPENCODE_CONFIG_DIR broken when only world-readable - permission issues with config directory access These issues address similar permission and configuration path problems. Feel free to ignore if your specific case differs from these.
Author
Owner

@rekram1-node commented on GitHub (Jan 3, 2026):

yeah will fix

@rekram1-node commented on GitHub (Jan 3, 2026): yeah will fix
Author
Owner

@rekram1-node commented on GitHub (Jan 7, 2026):

i believe this is fixed

@rekram1-node commented on GitHub (Jan 7, 2026): i believe this is fixed
Author
Owner

@michabbb commented on GitHub (Jan 7, 2026):

@rekram1-node if you tell me in which version, i can test it.... 😏

@michabbb commented on GitHub (Jan 7, 2026): @rekram1-node if you tell me in which version, i can test it.... 😏
Author
Owner

@rekram1-node commented on GitHub (Jan 7, 2026):

https://github.com/anomalyco/opencode/commit/f2e65e40ea55e993cdbccaedb76e79d782175402

It'd be on latest or one of the more recent versions

@rekram1-node commented on GitHub (Jan 7, 2026): https://github.com/anomalyco/opencode/commit/f2e65e40ea55e993cdbccaedb76e79d782175402 It'd be on latest or one of the more recent versions
Author
Owner

@michabbb commented on GitHub (Jan 11, 2026):

@rekram1-node fixed, thanks a lot 👍

@michabbb commented on GitHub (Jan 11, 2026): @rekram1-node fixed, thanks a lot 👍
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#4132