Home

EPERM

EPERM, short for operation not permitted, is an errno value used by POSIX-compliant operating systems to indicate that a requested operation is not allowed by the system policy or by the privileges currently held by the process. It signals that the operation itself is disallowed, even if the target resource could be accessed under different circumstances.

Common situations include attempting to change a file’s ownership or permissions without sufficient privileges, or trying

EPERM is distinct from EACCES, which indicates that access to a resource is denied due to its

In the C language and many POSIX interfaces, EPERM is defined in errno.h and is part of

Related errno values include EACCES, ENOENT, EINVAL, and EISDIR. The meaning of EPERM can vary with the

to
perform
privileged
actions
such
as
setting
a
process’s
user
ID,
mounting
a
device,
or
modifying
kernel-level
settings
when
not
running
with
appropriate
capabilities.
EPERM
is
reported
when
the
kernel
blocks
an
operation
for
policy
reasons
rather
than
simply
due
to
insufficient
access
to
a
specific
resource.
Security
modules,
such
as
SELinux
or
AppArmor,
or
capability-based
restrictions
can
also
cause
EPERM.
mode
or
ACLs.
EPERM
means
the
operation
itself
is
not
permitted
by
policy
regardless
of
file
permissions.
In
practice,
a
program
may
receive
EPERM
when
attempting
an
action
that
is
not
allowed
by
the
process’s
privileges
or
by
system
policy.
the
standard
errno
set.
On
many
systems
it
has
the
numeric
value
1,
though
the
exact
value
is
system-specific;
the
symbolic
constant
EPERM
should
be
used
for
portability.
platform
and
security
configuration,
so
consulting
system-specific
documentation
is
advisable
when
debugging
permission-related
errors.