2

I am executing a docker-compose up in WSL for an image I have build and I get this error:

Error response from daemon: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: exec: "/my_path/my_shell_script": permission denied: unknown

I have found some suggestions in a couple of questions like this where they say to change the permission on the directory which I try to access but it didnt work, I still get the same error. Any idea how I can address this?

KZiovas
  • 3,491
  • 3
  • 26
  • 47
  • Maybe this could help. https://stackoverflow.com/questions/38882654/docker-entrypoint-running-bash-script-gets-permission-denied . You could assign execute permissions on your script during the image building – GeralexGR Jul 06 '22 at 12:27
  • hello, thanks for the comment. Yes I found this as well also did not work. – KZiovas Jul 06 '22 at 12:31
  • 2
    `permission denied means permission denied` that was revealing really :-P – KZiovas Jul 06 '22 at 12:49

1 Answers1

6

ok it was a permissions problem, probably related to the user because when I simply changed the permissions just for the user to :

chmod u+x /my_path/my_shell_script

it did not work but when I did it for all users:

chmod a+x /my_path/my_shell_script

it solved the permission issue

KZiovas
  • 3,491
  • 3
  • 26
  • 47