Cannot Save Script or SSH Task Containing chmod
Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.
Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Problem
When creating a script task or SSH task in a build plan, if the inline script includes a chmod command like chmod +x <filename>, saving the task command results in an error.
Diagnosis
No errors appear in the logs, failure appears to be client side. Validate this by confirming no errors are present in atlassian-bamboo.log or by generating a HAR file.
Cause
A firewall is blocking "unsafe" text strings from being sent through to the server. "chmod +x" is being detected as potentially unsafe or malicious, and the firewall is preventing the client (web browser) from sending this information through to the Bamboo server
Resolution
Configure exceptions in firewall for Bamboo