Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

bin//sonar-scanner: 103: exec: : Permission denied

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.

like image 346
VanagaS Avatar asked Jul 11 '16 19:07

VanagaS


People also ask

How to grant permission to run the scanner script file?

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

Can I execute sonar-scanner with the same user?

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.

What is permission denied error in Docker?

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?


1 Answers

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).

like image 122
VanagaS Avatar answered Sep 29 '22 06:09

VanagaS