EACCES: permission denied, mkdir '/Users/user/.local/share/opencode' #1600

Closed
opened 2026-02-16 17:31:43 -05:00 by yindo · 3 comments
Owner

Originally created by @alexstyl on GitHub (Sep 4, 2025).

Originally assigned to: @thdxr on GitHub.

I installed opencode on my mac using curl (and then using brew) and I am getting the following error:

> opencode
> EACCES: permission denied, mkdir '/Users/alexstyl/.local/share/opencode'
    path: "/Users/alexstyl/.local/share/opencode",
 syscall: "mkdir",
   errno: -13,
    code: "EACCES"


Bun v1.2.19 (macOS arm64)

I tried uninstalling and installing again and manually create the folder, but still the same error. How do I install it properly?

Originally created by @alexstyl on GitHub (Sep 4, 2025). Originally assigned to: @thdxr on GitHub. I installed opencode on my mac using curl (and then using brew) and I am getting the following error: ```bash > opencode > EACCES: permission denied, mkdir '/Users/alexstyl/.local/share/opencode' path: "/Users/alexstyl/.local/share/opencode", syscall: "mkdir", errno: -13, code: "EACCES" Bun v1.2.19 (macOS arm64) ``` I tried uninstalling and installing again and manually create the folder, but still the same error. How do I install it properly?
yindo closed this issue 2026-02-16 17:31:43 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Sep 4, 2025):

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

  • #1856: Similar directory creation issue in ~/.local/share/opencode (though that was specifically for the /bin subdirectory)
  • #359: Permission denied errors on macOS with multiple user accounts (different root cause but similar symptoms)

The core issue appears to be related to opencode trying to create directories in ~/.local/share/opencode but lacking proper permissions. Issue #1856 was closed after a fix for directory creation, but your issue suggests the base directory creation might still have permission problems on macOS.

Feel free to ignore if none of these address your specific case.

@github-actions[bot] commented on GitHub (Sep 4, 2025): This issue might be a duplicate of existing issues. Please check: - #1856: Similar directory creation issue in ~/.local/share/opencode (though that was specifically for the /bin subdirectory) - #359: Permission denied errors on macOS with multiple user accounts (different root cause but similar symptoms) The core issue appears to be related to opencode trying to create directories in ~/.local/share/opencode but lacking proper permissions. Issue #1856 was closed after a fix for directory creation, but your issue suggests the base directory creation might still have permission problems on macOS. Feel free to ignore if none of these address your specific case.
Author
Owner

@rekram1-node commented on GitHub (Sep 4, 2025):

@alexstyl what happens if you run:

mkdir -p ~/.local/share
chown -R $USER ~/.local

and then try again

@rekram1-node commented on GitHub (Sep 4, 2025): @alexstyl what happens if you run: mkdir -p ~/.local/share chown -R $USER ~/.local and then try again
Author
Owner

@alexstyl commented on GitHub (Oct 27, 2025):

that did the trick. had to restart my terminal to be able to do do requests as it was giving me API call errors.

thanks

@alexstyl commented on GitHub (Oct 27, 2025): that did the trick. had to restart my terminal to be able to do do requests as it was giving me API call errors. thanks
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#1600