While running a test build using Gitlab-CI + Sonarqube, it fails to execute the command bin/sonar-scanner
. I get the error 103: exec:: Permission denied
.
It executes normally on the shell but not via the build automation using the CI.
If you are running the scanner from a Unix machine, it happens that sometimes you need to grant permission on the script file. Locate the scanner folder Go to the sub-folder sonar-scanner-/bin
Just to verify that you have a working sonar-scanner, could you please execute directly the sonar-scanner with the same user and see if it runs (if you get an error about missing properties, that’s fine)? Note that sonar-scanner only runs in the “end” command.
When we run a docker run command, it relays on many files to load the Docker image. When these files do not have enough permissions then it shows up permission denied error. Let’s see a few instances when our Support Engineers fixed this error. How we fix the Docker run permission denied error?
Thanks to a similar situation and response at: https://stackoverflow.com/a/37460784/2546381
It turned out to be that, the configured docker image, which Gitlab-runner is spinning up, has no Java installed in it and this script requires Java. It is also evident if we look into the sonar-scanner executable (which is a plain text shell script file).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With