| Previous | Next |
| ENOENT |
EPERM
What this errno usually means
EPERM means that the requested operation is not permitted in the current security or ownership context. It is not simply another spelling of “permission denied”: the distinction matters because an operation may have the expected read or write mode bits and still be rejected by a rule that requires ownership, a capability, or an immutable-file policy.
For example, unlinking or replacing a name in a sticky directory can be restricted to the file owner, directory owner, or a privileged process. On Linux, operations can also be governed by capabilities and by filesystem attributes such as immutable or append-only. A hard-link request may similarly fail when policy forbids creating a new link to the target.
How to investigate
- Identify the exact system call and the object it targets;
EPERMis meaningful only in that API’s context. - Check ownership and directory rules, not just the mode bits on the final file. A parent directory or sticky-directory rule can decide the result.
- For services and containers, inspect the effective identity, capability set, mount options, and any filesystem attributes or security policy that apply.
- Do not bypass the failure by broadly running the application as root. Give the process only the authority required for the documented operation.