Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Permission denied for build.sh file

$ ./build.sh --quiet verify  /home/travis/build.sh: line 59: ./build.sh: Permission denied.   The command "./build.sh --quiet verify" exited with 126.  

enter image description here

like image 655
Amit Kumar Avatar asked Feb 10 '17 08:02

Amit Kumar


People also ask

How do I fix sh Permission denied?

To fix the permission denied error in Linux, one needs to change the file permission of the script. Use the “chmod” (change mode) command for this purpose.

Does sh Permission denied?

To avoid this “permission denied error,” the only thing you have to do is to add “x” or “execution” permission to this “samplescript.sh” file and make it executable for a typical user. Firstly, check out the file permission of the shell script.

How do I fix bash permission denied?

Solution to fix the bash: ./program_name: permission denied error. chmod u+x program_name– In this line, the chmod command will change the access mode to execute, denoted by x. only the file's owner will have the permission to execute the file.


2 Answers

Looks like you need to check in the file build.sh with execution permissions. Please try the following from your own machine:

git update-index --add --chmod=+x build.sh git commit -m 'Make build.sh executable' git push 
like image 94
joepd Avatar answered Sep 17 '22 13:09

joepd


You can grant the needed permission by adding this lines to the .travis.yml

before_install:   - chmod +x build.sh 
like image 42
Lanayx Avatar answered Sep 20 '22 13:09

Lanayx