I'm having trouble getting a gitlab-runner to execute tasks and not sure what I am doing wrong. This is running in Kubernetes but probably not related to Docker or Kubernetes or anything else.
/bin/bash: line 1: /scripts-1002-1043121/prepare_script: Permission denied Executing into the actual pod:
runner-qeaugn8yj-project-1002-concurrent-0-m5ikq7m3:/# ps -auxwww USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND root 1 0.0 0.0 2416 1784 ? Ss 10:21 0:00 /bin/bash root 15 0.0 0.0 2740 2464 pts/0 Ss 10:50 0:00 bash root 21 0.0 0.0 1740 788 pts/0 R+ 10:50 0:00 ps -auxwww runner-qeaugn8yj-project-1002-concurrent-0-m5ikq7m3:/# ls -lahtr /scripts-1002-1043121/prepare_script -rwxrwxrwx 1 root root 434 Oct 4 10:21 /scripts-1002-1043121/prepare_script runner-qeaugn8yj-project-1002-concurrent-0-m5ikq7m3:/# /scripts-1002-1043121/prepare_script bash: /scripts-1002-1043121/prepare_script: Permission denied runner-qeaugn8yj-project-1002-concurrent-0-m5ikq7m3:/# bash /scripts-1002-1043121/prepare_script {"script": "/scripts-1002-1043121/prepare_script"} Running on runner-qeaugn8yj-project-1002-concurrent-0-m5ikq7m3 via gitlab-runner-7b66fddb55-tr6b5... {"command_exit_code": 0, "script": "/scripts-1002-1043121/prepare_script"} The script is running as root and so is my output from above.
runner-qeaugn8yj-project-1002-concurrent-0-m5ikq7m3:/# cat /scripts-1002-1043121/prepare_script #!/usr/bin/env bash start_json="{\"script\": \"$0\"}" echo "$start_json" ...
noexecoption given tomount. I don't know Kubernetes at all, so I cannot tell if (how, why) this is possible in your case.