Question

I'm trying to use lftp to download a very large file over ftp. But pget is only opening one TCP connection as far as I can see by netstat -na. Here's my command and the debug output:

Script:

open -u username,password aftp.linksynergy.com
pget -n 5 /36342_2923873_mp.txt.gz -o buy.com.csv.gz

Run:

user@db1:/mnt/tmp/lftp_test$ lftp -d -f lfscript
---- Resolving host address...
---- 1 address found: 63.123.248.17
---- Connecting to aftp.linksynergy.com (63.123.248.17) port 21
<--- 220 gcws3002.private.linksynergy.com FTP server (Version wu-2.6.2-9) ready.
---> FEAT
<--- 530 Please login with USER and PASS.
---> AUTH TLS
<--- 500 AUTH command not supported.
---> USER username
<--- 331 Password required for username.
---> PASS *******
<--- 230 User username logged in.
---> FEAT
<--- 500 'FEAT': command not understood.
---> PWD
<--- 257 "/" is current directory.
---> TYPE I
<--- 200 Type set to I.
---> SIZE /36342_2923873_mp.txt.gz
<--- 550 /home/client/username//36342_2923873_mp.txt.gz: not a plain file.
---> MDTM /36342_2923873_mp.txt.gz
<--- 550 //36342_2923873_mp.txt.gz: No such file or directory.
---> PASV
<--- 227 Entering Passive Mode (63,123,248,17,29,90)
---- Connecting data socket to (63.123.248.17) port 7514
---- Data connection established
---> RETR /36342_2923873_mp.txt.gz
<--- 150 Opening BINARY mode data connection for /home/upload/upload_bin/affiliate_download/get_merchandiser_file.pl.

Note that the multi-threaded download does work on another server I tested on (an apache mirror site for testing), so I'm betting that this is just an unsupported feature of the FTP server in this particular case.

Était-ce utile?

La solution

You're quite right. As you can see from your output, the server doesn't respond to the FEAT command, which is used to determine if a server supports the RESTart command (RFC3659 Section 5.4).

Parallel FTP downloads are based on pretending to restart a download from N points, reading 1/Nth of the file from each point, and then combining the result. Since REST isn't supported by the server, the client can't do this.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top