java.nio.file.AccessDeniedException: /path
The OS denied a file operation to the Java process.
Seen on:
Java
Meaning
The JVM user lacks permission, the target is read-only, or (on Windows) another process has the file locked.
Common causes
- Process user lacks permissions
- Writing into a read-only mount (containers)
- File locked on Windows
⚡ Quick fix
- Fix ownership/permissions
- Write to a writable volume
- Close other programs holding the file
Detailed fix by platform
Linux
ls -l /path && id
How to diagnose
- User — Which user runs the JVM?
- Mount — Read-only filesystem?
🧠 Still stuck? Analyze your error
Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.
Was this page helpful?
Report a correction or suggest an improvement
Last updated 2 Oct 2026