Skip to content
BENIBIX Learn

sandbox.filesystem.denyWrite

AI⌨️ Claude CodeConfiguration

Also known as denyWrite

A list of paths sandboxed commands may never write to.

Think of it like

It is like a do not touch sign on one shelf in your room.

Example

Jack wants Claude to never touch the deploy keys folder in his repo. He adds it to denyWrite, and writes there fail.

Why it matters

It guards one folder in a place that is open.

Definition

sandbox.filesystem.denyWrite is a settings key. It stops commands in the sandbox from writing to the paths it lists. That holds even inside a folder they may write to. Lists from all settings files are joined. The paths from your Edit deny rules are added too.

Example code

json
{
  "sandbox": {
    "filesystem": {
      "denyWrite": ["/etc", "/usr/local/bin"]
    }
  }
}
Keep commands out of system files and apps.

Common mistake

Thinking it also stops reading. It only blocks writes, so use denyRead for that.

Key takeaways

  1. 1
    Never write here. Listed paths.
  2. 2
    Beats allowed areas. Even the project.
  3. 3
    Lists join. Plus Edit denies.