Skip to content
BENIBIX Learn

Read Permission Rule vs Edit Permission Rule

People think a Read deny rule only stops reading, and an Edit rule is needed to stop changes. A Read deny rule stops both. Claude cannot read the path, and cannot edit or write it either. An Edit rule only covers changes, so a file can be readable but locked. To hide a secret, deny Read. To keep a file safe but in view, deny Edit.

AI⌨️ Claude Code

Read Permission Rule

A rule that stops Claude from reading a file, like your keys.

A Read permission rule matches the files Claude may read. It is written as Read and a path, such as Read(./.env) or Read(./secrets/**). As a deny rule it keeps Claude's file tools away from that path. It also blocks Edit and Write there, and it tries to cover Grep, Glob and @file mentions too. A .claudeignore file does nothing, so put those paths here.

Example
Lucy's project has a .env file with live keys. She denies Read(./.env), and Claude can no longer open it.
Why it matters
A file Claude reads goes into the chat. A deny rule keeps a secret from ever getting there.
Full entry
AI⌨️ Claude Code

Edit Permission Rule

A rule that says which files Claude may change.

An Edit permission rule matches the files that Claude may change in your project. It is written as Edit and a path, such as Edit(src/**). It covers every built-in tool that edits files, including Write. It also covers where a shell command writes with > or tee. A rule written as Write(path) does not match, so always use Edit.

Example
Emma lets Claude change code in src freely. She denies the CI folder, so those files stay hers.
Why it matters
Edits change your project. These rules choose which changes are routine and which need a look.
Full entry

In one line

Read Permission Rule
A rule that stops Claude from reading a file, like your keys.
Edit Permission Rule
A rule that says which files Claude may change.