Linux errno 1 (EPERM) — Operation Not Permitted
About Linux errno 1 (EPERM)
Linux errno 1 (EPERM) means the process does not have the required permissions to perform the requested operation. This guide covers everything you need to know about this topic, including common causes, step-by-step solutions, and answers to frequently asked questions.
Here are the key things to understand: EPERM — operation not permitted by the kernel. Different from EACCES — EPERM means the operation is fundamentally not allowed. Common when non-root users attempt privileged operations. Can also occur with SELinux or AppArmor denials. Understanding these fundamentals will help you diagnose and resolve this issue more effectively.
The most common reasons this occurs include: Attempting a root-only operation as normal user. SELinux or AppArmor security policy denial. Capability missing for the operation. Immutable file attribute set. Identifying the root cause is the first step toward finding the right solution.
To resolve this, follow these recommended steps: Run the command with sudo for root privileges. Check SELinux status: sestatus and audit log. Check file attributes: lsattr filename. Verify process capabilities with getpcaps. If these steps do not resolve the issue, consider consulting additional resources or a qualified professional.
This article is part of our Linux Error Codes collection on Error Codes Wiki. We provide comprehensive, up-to-date information to help you find solutions quickly.
Quick Answer
What is the difference between EPERM and EACCES?
EACCES is a file permission issue. EPERM means the operation itself is not allowed regardless of permissions.
Overview
Linux errno 1 (EPERM) means the process does not have the required permissions to perform the requested operation.
Key Details
- EPERM — operation not permitted by the kernel
- Different from EACCES — EPERM means the operation is fundamentally not allowed
- Common when non-root users attempt privileged operations
- Can also occur with SELinux or AppArmor denials
Common Causes
- Attempting a root-only operation as normal user
- SELinux or AppArmor security policy denial
- Capability missing for the operation
- Immutable file attribute set
Steps
- 1Run the command with sudo for root privileges
- 2Check SELinux status: sestatus and audit log
- 3Check file attributes: lsattr filename
- 4Verify process capabilities with getpcaps