Permission denied for build.sh file

后端 未结 4 1613
星月不相逢
星月不相逢 2021-01-30 10:31
$ ./build.sh --quiet verify

/home/travis/build.sh: line 59: ./build.sh: Permission denied. 

The command \"./build.sh --quiet verify\" exited with 126. 
4条回答
  •  挽巷
    挽巷 (楼主)
    2021-01-30 10:42

    Run the script using bash

    Another option would be to run the script using bash, this would omit the need to modify the files' permissions.

    bash path/to/file.sh
    

    Alternatively:

    sh path/to/file.sh
    

    Note that

    In this case you're not executing the script itself, you're executing bash or sh which then runs the script. Therefore the script does not need to be executable.

    Make sense?

提交回复
热议问题