Linux Error Code EEXIST (17)
The file or directory already exists.
The file or directory already exists.
| Code | EEXIST (17) |
| Product | Linux |
| Company / origin | Linux community · International open source |
| Category | Operating Systems |
| Platform / versions | Linux kernel 4.x and later · Architecture-dependent errno numbering |
| Severity | warning |
| Official source | Linux man-pages: errno(3) ↗ |
| Last verified | 2026-11-08 |
What does Linux error EEXIST (17) mean?
EEXIST (errno 17) means an operation that requires a new path found an existing one. It is common with mkdir, link, and package or deployment scripts that assume a clean target.
Common causes
- The target file or directory was created earlier.
- A previous deployment or extraction left the path behind.
- Two processes raced to create the same path.
How to fix it
- Step 1
Check the path and decide whether to reuse, rename, or remove it.
- Step 2
Make the operation idempotent, or use a unique target directory per deployment.
- Step 3
Use mkdir -p when the intent is to ensure the directory exists.
When to escalate
Related codes
| Code | Name | What it means |
|---|---|---|
ENOENT (2) | No Such File or Directory | The file or directory does not exist at the path used. |
EACCES (13) | Permission Denied | The process does not have permission to access the file or directory. |
EADDRINUSE (98) | Address Already in Use | The network address or port is already bound. |
EBUSY (16) | Device or Resource Busy | The resource is busy and cannot be used or released. |
ECONNREFUSED (111) | Connection Refused | The remote host actively refused the connection. |
Source & verification
This page was checked against Linux man-pages: errno(3) on 2026-11-08. The code, product, and platform fields are kept separate from the explanation so corrections can be made without changing the URL.
Open Error Codes is independent and not affiliated with Linux community. Always confirm destructive or security-sensitive steps with the official documentation.