Docker "standard_init_linux: exec user process caused permission denied" in CI
When the runtime tries to exec the container entrypoint and the file lacks the executable bit (or a script has a bad interpreter line), the kernel returns EACCES and the container dies at startup with "exec user process caused: permission denied".
What this error means
A container exits immediately with standard_init_linux.go:228: exec user process caused: permission denied.
docker
standard_init_linux.go:228: exec user process caused: permission deniedCommon causes
The entrypoint file is not executable
A COPYed script or binary without the +x bit cannot be exec'd.
A script copied from a non-exec host file
Files copied from Windows or an archive often lose the executable bit.
A bad shebang on a wrapper script
A shebang pointing at an interpreter that is not present can surface as a permission/exec failure.
How to fix it
Set the executable bit during build
- Use
COPY --chmod(BuildKit) or aRUN chmodto make the entrypoint executable.
Dockerfile
COPY --chmod=755 entrypoint.sh /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]Fix the interpreter line for scripts
- Ensure the shebang points at a shell present in the image.
entrypoint.sh
#!/bin/sh
exec "$@"How to prevent it
- Mark entrypoints executable at build time with
--chmodorRUN chmod. - Verify the shebang interpreter exists in the target base image.
Related guides
Docker "OCI runtime exec failed: permission denied" (entrypoint not +x) in CIFix "OCI runtime exec failed: exec: permission denied" in CI - the entrypoint script lacks the executable bit…
Docker "standard_init_linux.go: exec format error" in CIFix the Docker "standard_init_linux.go: exec format error" in CI, caused by an architecture mismatch or an en…
Docker "failed to set up exec" (entrypoint shell missing in scratch) in CIFix Docker exec setup failures in CI - a shell-form CMD/ENTRYPOINT in a `scratch` (or distroless) image has n…