What does errno 1 (EPERM) mean?

 

Could be also:

ConstantTypeOS
ERROR_INVALID_FUNCTIONWin32 errorWindows
STATUS_WAIT_1NTSTATUSWindows
kOSReturnErrorKern returnMac
KERN_INVALID_ADDRESSKern returnMac
ippStsNoOperationIntel Ipp StatusAny
S_FALSEHRESULTWindows
WDSCP_CATEGORYHRESULTWindows
WDSMCSERVER_CATEGORYHRESULTWindows
WDSTPTMGMT_CATEGORYHRESULTWindows
APC_INDEX_MISMATCHBugCheck CodeWindows
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; EPERM is 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.

References