Permission Denied
Cheat sheet · https://pcornel.dk/topic.php?topic=6055
Answer
Permission denied means the caller was identified but is not allowed to do the requested action. Check which identity was actually used, its roles or policies, the resource scope, and local file or OS permissions on the target.
Remember
- Permission denied ≠ authentication failed.
- Administrator role assigned ≠ effective token/policy includes it now.
- Read permission ≠ write/execute/impersonate permission.
- Broad admin grant fixes symptom ≠ root authorization model is correct.
First checks
id; sudo -l— Linux privilegeswhoami /priv— Windows- API role/permissions of automation identity — access
Commands
sudo -l -U automationkubectl auth can-i <verb> <resource> --as=<sa>
Verify in this order
action → permission check → denied → minimal grant
Where it usually breaks
Permission evidence proves an authorization decision for a principal/action/resource at a point in time; it does not prove the policy is least privilege or replicated consistently everywhere.
Permission Denied troubleshooting proof-boundary map
| Boundary | Healthy evidence | Suspicious evidence |
|---|---|---|
| Symptom / scope | Time window, immutable source/run identity, effective inputs and exact targets are explicit | Floating source, changed inputs or ambiguous targets destroy reproducibility |
| First failed boundary | Transport/auth/dependency/render/operation evidence identifies the earliest divergence | Investigation starts at the final error and skips earlier unproven boundaries |
| Effective outcome | Controller result is paired with target read-back and workload/service acceptance | Green execution state or changed symptom substitutes for effective-state verification |
| Recovery / closure | Minimal change restores the original test and regression/partial-state checks are clean | Broad retry or unrelated edits make the incident non-reproducible and hide residual state |
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=6055