Best AI Tools

Permission troubleshooting · Google docs checked Nov 3, 2026

Why does Gemini CLI get EACCES opening settings.json with sandboxing enabled?

Diagnose Gemini CLI sandbox startup errors that name settings.json and EACCES by checking the exact CLI process, settings path, filesystem access, container mounts, and sandbox startup separately.

What does `EACCES: permission denied, open .../settings.json` tell me?

It tells you that the process reporting the error could not open the named path with its current operating-system permissions. Issue #1446 reports this message for `/home/node/.gemini/settings.json` after Gemini CLI found the sandbox image, but the report does not prove whether ownership, parent-directory access, a container boundary, or another host setup caused it. Start with the exact path and the identity/environment of the Gemini CLI process that printed it.

Is this the same as a sandboxed command being denied?

Not necessarily. A path-specific `open ... settings.json` EACCES message identifies a settings-file access failure to investigate. Google’s sandbox troubleshooting separately describes sandboxed operations denied by sandbox configuration, and lists fatal sandbox and fatal configuration exit codes separately. Capture the full error and exit code before deciding which layer failed.

Which settings file path should I check?

Google documents user settings at `~/.gemini/settings.json`, project settings at `<project>/.gemini/settings.json`, and system settings at `/etc/gemini-cli/settings.json` on Linux; system settings can override other settings. Check the literal path in the error instead of assuming it is the user file. If Gemini CLI itself runs in a container, `HOME` and paths may refer to that process environment rather than your host login.

How can I check Linux permissions without printing settings?

Run `id`, `printf 'HOME=%s\n' "$HOME"`, and `namei -l /the/exact/path/from/the/error` in the same environment where Gemini CLI runs. Then use `test -r /the/exact/path/from/the/error; printf 'readable=%s\n' "$?"` to check readability without displaying file contents. Check each parent directory for traversal access. Do not paste settings contents into a bug report; they can contain sensitive values.

Could a container mount be responsible?

It could be relevant if the CLI process is inside a container or its home directory is mounted from the host: compare the process UID, `HOME`, the path visible inside that environment, and whether the relevant mount is present and readable. Gemini’s sandbox docs describe the project workspace mount for container sandboxes and optional mounts for files outside the workspace; that workspace mapping does not by itself establish access to the CLI user’s settings directory. Do not mount credentials or the whole home directory merely to test this error.

How do I separate settings access from Docker or Podman startup?

Record the complete output. If it names a settings file and says `open ... EACCES`, inspect that exact path and process first. If settings load and the later failure names Docker/Podman, the sandbox image, or a command mount, follow the sandbox prerequisites and debug output instead. Google documents exit code 52 for fatal configuration errors and 44 for fatal sandbox-environment errors; retain the actual exit code rather than inferring it from the word “sandbox.”

Should I use chmod 777 or disable sandboxing?

No. Broad permission changes weaken access controls and do not identify the failing user, directory, or mount. Do not turn off sandboxing as a first diagnostic step. Correct only a confirmed ownership, parent-directory, or mount issue according to the machine or container administrator’s intended policy, and keep settings and credentials private.

What information should a minimal issue report include?

Include Gemini CLI version, operating system, whether the CLI process runs on the host or inside a container, the exact launch command with secrets removed, the literal error path, process UID and HOME, sanitized permission/ownership output for the path and parent directories, sandbox provider, full error and exit code. Do not include settings contents, tokens, prompts, repository data, or unrelated environment values. State explicitly if the problem only occurs with `--sandbox` or also without it; do not disable sandboxing if that would expose consequential operations.

Does issue #1446 prove current Gemini CLI has a sandbox bug?

No. It is a June 2025 report from one Fedora Linux 40 setup, and it does not document a verified root cause or a current-release reproduction. Treat it as a useful error signature, not evidence of prevalence or a confirmed current defect.

Sources

Methodology and limitations

This guide uses Gemini CLI issue #1446 as one historical report: on Fedora Linux 40, a user reported EACCES while opening /home/node/.gemini/settings.json after the sandbox image was found. The issue does not establish a current release-wide defect or root cause. Current Google documentation checked November 3, 2026 distinguishes settings files and their scopes, sandbox activation and workspace mounts, and configuration versus sandbox exit codes. The steps below first identify which process and exact path produced the error, then separate settings-file access from sandbox command or mount failures. Do not weaken file permissions or expose settings/authentication files to a sandbox as a diagnostic shortcut.

Affiliate placeholder {{AFF_TOOLNAME}} — referral link not configured.