exec permission denied Docker Origin: Platform & cloud OSI layer 7 · Application Last updated 13 Oct 2026

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.

Exact message you may see exec /entrypoint.sh: permission deniedexec user process caused: permission deniedpermission denied: unknownOCI runtime create failed: permission denied
Seen on: Docker

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

  1. chmod +x in the Dockerfile (or COPY --chmod=755)
  2. Commit the executable bit: git update-index --chmod=+x
  3. Run via the interpreter: ["sh", "/entrypoint.sh"]

Detailed fix by platform

Dockerfile

  1. bash
    COPY --chmod=755 entrypoint.sh /entrypoint.sh
    ENTRYPOINT ["/entrypoint.sh"]

How to diagnose

  1. Mode — docker run --rm --entrypoint ls image -l /entrypoint.sh
  2. Mounts — Is the path bind-mounted from the host?
  3. 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:

Where this error sits

Origin: Platform & cloud. Errors that are often confused with or caused by this one (click to open):

0x80070005 — Windows Error 0x80070005 (E_ACCESSDENIED): Access is denied (Windows)0x80070005AADSTS65001 — AADSTS65001: The user or administrator has not consented to use the application (Azure)AADSTS65001Access to the path is denied — System.UnauthorizedAccessException: Access to the path 'x' is denied (.NET)Access to the path is…AccessDeniedException — java.nio.file.AccessDeniedException: /path (Java)AccessDeniedExceptionACR unauthorized — Azure Container Registry: unauthorized: authentication required, visit https://aka.ms/acr/authorization (AKS ErrImagePull 401) (Azure)ACR unauthorizedarchive — /etc/letsencrypt/live/<domain>/privkey.pem symlink to archive unreadable (permissions after certbot upgrade) (SSL / TLS)archiveclipboard write blocked — NotAllowedError: Failed to execute 'writeText' on 'Clipboard': Document is not focused. (JavaScript)clipboard write block…Container failed to start — Cloud Run: The user-provided container failed to start and listen on the port defined provided by the PORT=8080 environment variable (Google Cloud / Firebase)Container failed to s…exec perm…

Explore the map of this error Full error map →

🧠 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.