Message94226
I have come accross an FTP server which lftp (an Unix command-line
client) handles well but ftplib doesn't. Both ftplib and lftp are
configured to use passive mode (this server apparently doesn't handle
non-passive), but the address sent in response by the server is a
private IP. Here is a wireshark transcript of the FTP conversation done
by lftp:
220 172.29.AAA.BBB FTP server ready
FEAT
211-Features:
LANG en
MDTM
UTF8
AUTH TLS
PBSZ
PROT
REST STREAM
SIZE
211 End
LANG
200 Using default language en
OPTS UTF8 ON
200 UTF8 set to on
USER XXXX
331 Password required for ftth_rdvph
PASS XXXX
230 Connexion reussie pour ftth_rdvph
PWD
257 "/" is the current directory
PASV
227 Entering Passive Mode (172,29,AAA,BBB,195,84).
LIST
150 Opening ASCII mode data connection for file list
226 Transfer complete
As you see, lftp had no problem opening a data connection. It probably
notices that the address advertised in response to PASV doesn't respond
(after e.g. a 2s. timeout), and falls back on the host's known address
instead. In contrast, ftplib simply sits while the connection is
attempted and bails out at the end with a connection error. |
|
Date |
User |
Action |
Args |
2009-10-18 21:22:25 | pitrou | set | recipients:
+ pitrou, giampaolo.rodola |
2009-10-18 21:22:25 | pitrou | set | messageid: <1255900945.2.0.567216991168.issue7167@psf.upfronthosting.co.za> |
2009-10-18 21:22:22 | pitrou | link | issue7167 messages |
2009-10-18 21:22:21 | pitrou | create | |
|