Permission Denied "exec entrypoint.sh"

I have recently created an action which utilises Join to send notification to devices. The action repository is based off Pushover which has some values changed.

However, when using my action, I have this error which doesn’t seem to occur in the Pushover action.

Sample run (Pushover only: Pass)

https://github.com/ShaunLWM/awdawd/runs/213770026

Sample run (Join and Pushover - failed):

https://github.com/ShaunLWM/awdawd/runs/213779607

Logs:

Error response from daemon: OCI runtime create failed: container_linux.go:345: starting container process caused "exec: \"/entrypoint.sh\": permission denied": unknown

I am kind of confused as to why is it happening as it runs off the exact same Dockerfile. 

I apologise for being new to this. I’ve tried changing the image in the Dockerfile but to no avail.

Thank you so much.

3 Likes

The runner is trying to run your entrypoint.sh as a script, but it looks like your entrypoint.sh is missing the execute bit.  You’ll need to add it to that file in your action’s repository.

On Linux or macOS, run:

chmod +x entrypoint.sh
git add entrypoint.sh
git commit

On Windows, run:

git add --chmod=+x -- entrypoint.sh
git commit

And then push the changes back up.

30 Likes

Ran the command and it’s now working as expected. Thank you so much for your help. I will definitely read up more about the additional paramters for the git add command as this is the first time I’ve seen the argument used. Thank you once again.

1 Like

This didn’t work for me unfortunately. In GKE i still get an error that says

OCI runtime create failed: container_linux.go:345: starting container
          process caused "exec: \"/server\": permission denied": unknown'

Also when i try to chmod +x server in the pipeline I get this error:

OCI runtime create failed: container_linux.go:349: starting container process caused "exec: \"/bin/sh\": stat /bin/sh: no such file or directory": unknown
123
5 Likes

@sef1995 I had the same problem (on Windows) fixed by converting .sh files to lf (instead of crlf).

Best of luck

1 Like