exec /entrypoint.sh: permission denied (container won't start)
The entrypoint or command isn’t marked executable inside the image, or it’s on a volume mounted noexec.
exec /entrypoint.sh: permission deniedexec user process caused: permission deniedpermission denied: unknownOCI runtime create failed: permission denied Meaning
Files copied from Windows or from a repo without the executable bit end up mode 644 in the image. Bind-mounting the source folder over the image can also replace an executable script with a non-executable host copy.
Common causes
- Script copied without the executable bit
- Bind mount overrides the file with a host copy lacking +x
- Volume/tmpfs mounted with noexec
- Running as a non-root USER without read/execute permission
⚡ Quick fix
- chmod +x in the Dockerfile (or COPY --chmod=755)
- Commit the executable bit: git update-index --chmod=+x
- Run via the interpreter: ["sh", "/entrypoint.sh"]
Detailed fix by platform
Dockerfile
- bash
COPY --chmod=755 entrypoint.sh /entrypoint.sh ENTRYPOINT ["/entrypoint.sh"]
How to diagnose
- Mode — docker run --rm --entrypoint ls image -l /entrypoint.sh
- Mounts — Is the path bind-mounted from the host?
- User — Which USER runs it?
🔧 Still not fixed?
Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:
Similar errors
Most viewed in Docker
- docker-credential-desktop error getting credentials - err: exec: "docker-credential-desktop": executable file not found in $PATH
- pull access denied pull access denied for image, repository does not exist or may require 'docker login'
- lookup registry-1.docker.io: no such host dial tcp: lookup registry-1.docker.io: no such host / Temporary failure in name resolution during docker build
Other ways to find it
Where this error sits
Origin: Platform & cloud. Errors that are often confused with or caused by this one (click to open):
🧠 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.
💬 What worked for others
No tips yet — did something else fix this for you?
Share what worked for you
Tips are checked by an editor before they appear. Links are removed.
Report a correction or suggest an improvement
Last updated 13 Oct 2026