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