When uploading a locally executable file via REST API, like the command below, the file does not appear executable in the directory.
curl -k -d @test.sh -XPUT --basic -H "Content-Type: application/octet-stream" -H "Accept: application/octet-stream" -u admin:password https://10.1.1.5:9070/api/tm/3.1/config/active/monitor_scripts/test.sh | python -m json.tool
An enhancement request has been filed for this.