11

I have an FTPS server which I can already work with using clients such as Filezilla and Syncback. I also have admin access to this FTPS server and I know that it is working properly with TLS because I see "TLS" in the Filezilla connection log.

I cannot, however, access this same FTPS server from R using the RCurl library (R version=3.4.3, RCurl version = 1.95-4.9, windows 7 PC). I expect it has something to do with my invocation of getURL(). Here's what happens when I try to list the files in a directory on the FTPS server:

library(RCurl)
url       <- "FTPS://<myIpaddress>/<path>/"
userpwd   <- "myname:mypasswd"
filenames <- getURL(url, userpwd=userpwd, ftp.use.epsv = FALSE, dirlistonly = TRUE, .opts=curlOptions(verbose=TRUE))

first attempt: connection refused on port 990

It complains about connection refused on port 990 (presumably the default port for FTPS?). I happen to have the FTPS server setup to use port 21. Filezilla didn't require a port number so I had left it out here too. Explicitly specifying port 21, however, gives another problem...

url <- "FTPS://<myIpaddress>:21/<path>/"

second attempt: unknown protocol

This time the complaint is about "unknown protocol". Don't understand. I am using a FTPS server listening on port 21, I specify the same on the URL. What could be wrong?

Can anyone recommend some ways to troubleshoot this further?

For completeness here's the FTPS server configuration (it's a synology diskstation NAS)... enter image description here

Angelo
  • 2,936
  • 5
  • 29
  • 44

1 Answers1

0

Add ftp.ssl = TRUE to the getURL options for SFTP.

This is the equivalent of --ftp-ssl in actual curl.

patrickmdnet
  • 3,332
  • 1
  • 29
  • 34