Use it when the symptom is “Permission Denied”: work through the layers in order and stop at the first one that fails.
Permission Denied
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.
1. Permission denied: missing rights for the automation identity.
2. Check effective permissions.
3. Grant least privilege needed (not admin).
4. Check file permissions/SELinux.
5. Document.
action → permission check → denied → minimal grant
Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Operational evidence path Verify boundary
authenticated principal → role/group/claim expansion → policy/ACL evaluation → resource/action → local privilege/object permission → operation → audit → target verification
Healthy evidence: effective identity and policy decision are attributable, the denied action/resource is explicit, the smallest policy correction succeeds, and audit/target verification confirms intended scope.
Step 2 Failure modes and next checks Narrow the fault
Suspicious evidence: admin rights are granted broadly, authentication and authorization are conflated, cached tokens are ignored, or success is tested with a different principal.
Permission evidence shows an authorization decision for a principal/action/resource at a point in time, but it does not show the policy is least privilege or replicated consistently everywhere.
Step 3 Common mistakes Narrow the fault
- Running with the wrong account.
- Missing sudo/become.
Evidence · 1 on this Topic
Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.
- 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.
id; sudo -l— Linux privilegeswhoami /priv— Windows- API role/permissions of automation identity — access
ReferenceWhat it is1 section · depth on demand
Core model
Show authentication identity; capture operation/resource; inspect effective RBAC/ACL/policy and deny precedence; check sudo/become/UAC or filesystem/service permissions; compare with least privilege requirement; change only the missing authorization; retest and ensure broader rights were not introduced.
ReferenceImportant terms & boundaries2 sections · depth on demand
What this shows and what it does not
Permission Denied owns generic automation authorization isolation; IAM, OS and platform-specific policy depth belongs in Security/Windows/Linux/platform branches.
In depth
Permission denied errors mean the automation's identity is not allowed to do what it tried: file access, sudo, API scope, device privilege level, Kubernetes RBAC, cloud IAM. The fix is to grant the minimum missing permission — not to switch to an all-powerful account.
| Context | Check |
|---|---|
| Linux file/command | id, ls -l, sudo -l -U automation |
| SSH | Key in authorized_keys, ssh -v |
| Network device | AAA authorization logs, privilege level |
| API | Token scopes/role, 401 vs 403 |
| Kubernetes | kubectl auth can-i <verb> <resource> --as=<sa> |
| Cloud | IAM policy simulator, activity log denials |
401 means authentication failed (who are you?); 403 means authenticated but not authorised (you may not do this).
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in Automation Troubleshooting > Permission Denied. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://learn.microsoft.com/en-us/azure/architecture/patterns/retry · confidence 94%Terms & aliases
Hover a linked term for a quick definition; click it to open its glossary entry. Aliases are other names that find this Topic in search.
Quick lookup tables
Permission Denied troubleshooting proof-boundary map
Fast symptom/scope, first-failed-boundary, effective-outcome and recovery/closure map for Permission Denied.
| 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 |