Issue
While deploying a build including a script, this message appears in the logs and the script does not run:
Insufficient Permission: /lcp-tmp/script/[Script-name].sh is not executable
Environment
- Liferay PaaS
Resolution
NOTE
Liferay Support does not recommend or endorse specific third-party products over others. The information provided about products not created by Liferay is for reference purposes only, and any implementation of these principles will be at your team's discretion.
- This occurs when executable permissions are not assigned to the script file. Liferay PaaS retains the permissions of deployed files.
- To resolve this:
- Check whether the file has executable permission (755) using a *NIX OS.
- If its permissions are different, use the command
$ chmod 755 [Script-name].shto change it. Then commit the change and redeploy the build.
Additional Information
- This can also occur after uploading a file using Windows (even when checking with MINGW-W64), since that operating system uses a different permission scheme. In this case, if you deploy through your Git repository, set the executable bit with git update-index --chmod=+x [Script-name].sh, then commit and push. Otherwise, change the script file permissions as described above using a *NIX machine or use the CLI for Linux on a Linux virtual machine.
- Command-Line Tool