Pcornel
Automation · Automation Troubleshooting

Permission Denied

Cheat sheet · https://pcornel.dk/topic.php?topic=6055

Back to the Topic

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 privileges
  • whoami /priv — Windows
  • API role/permissions of automation identity — access

Commands

sudo -l -U automation
kubectl 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

BoundaryHealthy evidenceSuspicious evidence
Symptom / scopeTime window, immutable source/run identity, effective inputs and exact targets are explicitFloating source, changed inputs or ambiguous targets destroy reproducibility
First failed boundaryTransport/auth/dependency/render/operation evidence identifies the earliest divergenceInvestigation starts at the final error and skips earlier unproven boundaries
Effective outcomeController result is paired with target read-back and workload/service acceptanceGreen execution state or changed symptom substitutes for effective-state verification
Recovery / closureMinimal change restores the original test and regression/partial-state checks are cleanBroad 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

Confirmation

Confirm action

Continue?