Fix bug with file permissions in linux
@@ -282,7 +282,7 @@ func (p *DefaultPlugin) UploadOutputToS3Bucket(log log.T, pluginID string, orche
// CreateScriptFile creates a script containing the given commands.
func CreateScriptFile(log log.T, scriptPath string, runCommand []string) (err error) {
// write source commands to file
- err = fileutil.WriteAllText(scriptPath, strings.Join(runCommand, "\n")+"\n")
+ _, err = fileutil.WriteIntoFileWithPermissions(scriptPath, strings.Join(runCommand, "\n")+"\n", appconfig.ReadWriteExecuteAccess)
if err != nil {
log.Errorf("failed to write runcommand scripts to file %v, err %v", scriptPath, err)
return
