Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Problems with TIdFTP::List()
#2
(09-20-2020, 08:39 AM)Asger-P Wrote: I get this error: 
EIdReplyRFCError with message 'PORT address does not match originator.'

when I try to do a listing using  IdFtp->List();

By default, TIdFTP uses active mode for transfers. That means TIdFTP opens a listening port for the FTP server to connect to, where the listening IP/Port is specified via a PORT command. I suspect the error likely means that the listening IP specified in the PORT command does not match the IP that TIdFTP originally connected to the FTP server from. TIdFTP uses the locally bound connected IP for the listening transfer IP. But if your FTP connections are passing through a router/NAT that is not FTP-aware to alter IPs specified in FTP commands, that could certainly cause issues. If that is the case, you can try using the TIdFTP.ExternalIP property to specify the router/NAT's public WAN IP for use in PORT commands.

Otherwise, try setting TIdFTP to use passive mode for transfers instead. That means the FTP server will open a listening port for TIdFTP to connect to. This is much more friendly to routers/NATs.

(09-20-2020, 08:39 AM)Asger-P Wrote: FileZilla still works with the same settings.

But, is FileZilla using active mode or passive mode for its transfers? It makes a difference.

Reply


Messages In This Thread
Problems with TIdFTP::List() - by Asger-P - 09-20-2020, 08:39 AM
RE: Problems with TIdFTP::List() - by rlebeau - 09-21-2020, 06:55 PM
RE: Problems with TIdFTP::List() - by Asger-P - 09-22-2020, 05:49 AM
RE: Problems with TIdFTP::List() - by rlebeau - 09-22-2020, 04:15 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)