Skip to content

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

Closed

Description

@alexstyl

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?

Activity

  1. github-actions commented on Sep 4, 2025

    @github-actions
    Contributor

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

    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.

  2. rekram1-node commented on Sep 4, 2025

    @rekram1-node
    Contributor

    @alexstyl what happens if you run:

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

    and then try again

  3. alexstyl commented on Oct 28, 2025

    @alexstyl
    Author

    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

  4. diptodesign commented on Jul 10, 2026

    @diptodesign

    Error: ENOENT: no such file or directory, mkdir 'C:\Users\user1.local\share\opencode'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions