I am trying to install Jenkins to achieve a Github -> EC2 instance folder pipeline. So far everything works well when I target an empty folder... however, when I target my production folder owned by www-data the SSH copy of the files fail for permission, as Jenkins uses the ubuntu user, the only one I have an SSH login for.

How do I solve this issue?

  • Have you tried running the command as another user? (sudo -u)
    – Preston Martin
    Commented Mar 27, 2018 at 19:46
  • Where am I given a chance to issue a command? the SSH is a plug-in to Jenkins, is it not?
    – JasonGenX
    Commented Mar 27, 2018 at 19:59
  • I did not know that you were using the Jenkins SSH plugin.
    – Preston Martin
    Commented Mar 27, 2018 at 20:01

1 Answer 1


The ssh plugin gives you both options, Either send build artifacts to remote server or run a command on the remote server. The name of the plugin is "send build artifacts over ssh".. use that


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.