opensshrundeck

Permission denied error for executing scripts from remote URL on Rundeck


I have an issue when I try to run script from remote URL on my Rundeck jobs. The script path is /home/ubuntu/rundeck/test-job.sh When I execute this script, its giving below error.

Execution failed: 56 in project Test-Environment: [Workflow result: , step failures: {1=Dispatch failed on 1 nodes: [test-rundeck.dom.net: IOFailure: error writing to tempfile: /home/ubuntu/rundeck/test-job.sh (Permission denied) + {dataContext=MultiDataContextImpl(map={}, base=null)} ]}, Node failures: {test-rundeck.dom.net=[IOFailure: error writing to tempfile: /home/ubuntu/rundeck/test-job.sh (Permission denied) + {dataContext=MultiDataContextImpl(map={}, base=null)} ]}, status: failed]```

Solution

  • Following your comments, a good practice is to put your scripts in a "neutral" space like /opt/scripts or something and give read/execute permissions to the rundeck user, /home/ubuntu is the ubuntu user space, and the rundeck user can't reach it.