Downloading files from an implicit FTP

Hi,

Hoping you guys can help!

As part of data security we're sent daily data files on a sharefile website. The sharefile site mentions the files can be downloaded via FTP and they also included the below information.

Security: Implicit SSL/TLS (Port 990) - Required

I did have a look on google and SO but couldn't find an answer to my question.
I've been able to download files off sites before but I have no idea how to do this.

Any help on this would be greatly appreciated.

Thanks,

Shan

Are you trying to read them into R? If so, what have you tried?

HI @Shan have you tried the curl package. I haven't tried myself but looking at the vignette https://cran.r-project.org/web/packages/curl/vignettes/intro.html#downloading_to_disk under the Customizing Requests section I think the approach would be

  • create a handle with the new_handle() function
  • set the various security , ftp options using handle_setopt() and handle_setheaders()
  • pass the header to curl_download()
1 Like

Hey Mara,

Sorry I should have clarified! I usually use the RCurl library to download files from basic ftp sites but I've never done it from an implicit FTP.

I usually use the below as a start:

library(RCurl)
url <- "ftp://yourServer"
userpwd <- "yourUser:yourPass"
filenames <- getURL(url, userpwd = userpwd,
             ftp.use.epsv = FALSE,dirlistonly = TRUE) 

Thanks,
Shan

Maybe try adding the port number explicitly:

url <- "ftp://yourServer:990"

Hey Adam,

Thanks for that, just tried to give it a go and got the below

Error in function (type, msg, asError = TRUE)  : response reading failed

I'll have look through your other suggestion and see if I can make it work.
Thanks,
Shan

Apologies all, I still couldn't get it to work. Can anyone give any advice on this?