Skip to content

Permissions

Permission denied — file read/write rejected

Three independent causes; diagnose each:

  • Cause A — OS-level permissions: run ls -la /path/to/file to check the permission bits, fix with chmod 644 (files) or chmod 755 (directories)
  • Cause B — Claude Code permission setting: you previously chose "Always deny" for this action; press Cmd+Shift+P (macOS) or Ctrl+Shift+P (Windows/Linux), search Claude: Manage Permissions, and change the rule to "Ask" or "Allow"
  • Cause C — .claudeignore rule mismatch: run cat .claudeignore to check whether a glob rule wrongly matches the target file; delete or tighten the offending rule

Prevention: use precise paths in .claudeignore instead of broad wildcards, periodically review "Always deny" rules, and keep project permissions at 644 (files) / 755 (directories).

skipAutoPermissionPrompt breaks Plan mode

Symptom: adding "skipAutoPermissionPrompt": true to settings.json makes Plan mode fail to run; removing it restores it.

Fix: open ~/.claude/settings.json, delete the entire skipAutoPermissionPrompt line, save, and restart the terminal.

Prevention: only add config options clearly documented for a purpose, and run a basic sanity check after changing permission-related config.

How does Claude Code's permission mechanism work?

Claude Code confirms actions like file operations and shell command execution. The first trigger pops a prompt with "Allow once", "Always allow", "Always deny". If you mistakenly pick "Always deny", that action type is blocked thereafter and must be changed manually in the Permission management UI.