Rcurl sftp protocol fails for ftpUpload

,

The following code works successfully when using FTP protocol -

RCurl::ftpUpload(what = "D:\<local-folder\file.pdf",
asText = FALSE,
to = ftp://our-linux-server>,
port =21,
userpwd = "username:password",
connecttimeout = 30

Changing it to use sFTP protocol fails -

RCurl::ftpUpload(what = "D:\<local-folder\file.pdf",
asText = FALSE,
to = sftp://our-linux-server>,
port =22,
userpwd = "username:password",
connecttimeout = 30

This receives -
Error in function (type, msg, asError = TRUE) :
Upload failed: Permission denied (3/-31)

I can see in the auth.log that the user connects successfully.
Additionally, using sFTP protocol locally from the server works successfully. Just not when using rCurl in R script.

Any thoughts?

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.