Docker Community Forums

Share and learn in the Docker community.

File execute permissions


(Traup) #1

I am using a php utility that creates bash scripts that get created on running containers and then cleaned up once they have completed. The scripts are executed via a docker exec command however I am getting a permissions denied error.

Since these files don’t exist on the container on build I can’t set a RUN command on build to chmod the file permissions.

I am using Docker for Windows with WSL as well as docker-sync with unison.

Has anyone else had a similar scenario where bash scripts need to be executed from outside the container and ran into permissions issues?

(Traup) #2

So I added the keyword bash in front of the script path and it worked.

I wonder if this is a windows (wsl) thing of if it applies to linux/mac as well.