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))
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>/"
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)...