# sandbox.filesystem.denyWrite

> A list of paths sandboxed commands may never write to.

**Field:** Artificial Intelligence  
**Category:** Claude Code  
**Also known as:** denyWrite

## Think of it like

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

## 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

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

## Example code

```json
{
  "sandbox": {
    "filesystem": {
      "denyWrite": ["/etc", "/usr/local/bin"]
    }
  }
}
```

Keep commands out of system files and apps.

## Why it matters

It guards one folder in a place that is open.

## Common mistake

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

## Three principles

- **Never write here.** Listed paths.
- **Beats allowed areas.** Even the project.
- **Lists join.** Plus Edit denies.

## Related terms

- [sandbox.filesystem.allowWrite](https://learn.benibix.com/term/ai/sandbox-allow-write-setting)
- [sandbox.filesystem.denyRead](https://learn.benibix.com/term/ai/sandbox-deny-read-setting)
- [Edit Permission Rule](https://learn.benibix.com/term/ai/edit-permission-rule)

---

Source: https://learn.benibix.com/term/ai/sandbox-deny-write-setting
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-16
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
