M-Brig 0 Posted Friday at 04:28 PM Hello, we have been using ICS FTP client component for over 10 years in Delphi and all is working well. The last version we installed in the compiler is dated 13 February 2013. However, we recently encountered a problem requesting a directory from an FTP server. The ICS FTP component requests the directory in auto passive mode and the FTP server rejects that request then the component disconnects. We have another application that uses the C # Fluent FTP Client. When this component requests a directory in auto passive mode the server rejects it then the component switches to passive mode and gets the LIST just fine. Does the latest ICS FTP Client component handle this switch when requesting the directory from the server. We just downloaded the Version 9.3. Thanks for all your help. Share this post Link to post
Remy Lebeau 1392 Posted Friday at 04:47 PM (edited) 19 minutes ago, M-Brig said: The ICS FTP component requests the directory in auto passive mode and the FTP server rejects that request then the component disconnects. What is "auto passive mode"? Do you mean "Active" mode? "Active" (server connects to client) and "Passive" (client connects to server) are the 2 modes defined by the FTP protocol, and "Active" is the default. "Active" mode is not friendly to NATs, which are commonly used nowadays, so it is best to just always use "Passive" mode only. Edited Friday at 04:48 PM by Remy Lebeau Share this post Link to post
M-Brig 0 Posted Friday at 05:35 PM Thanks Remy as always. Your a great help to the Delphi community. My apologies I mixed up the terminology. The difference modes are Passive (PASV) and Extended Passive mode (EPSV). The C # component first request the directory using EPSV. This request is rejected then the component requests the directory in PASV mode and receives the full directory. The ICS FTP component I think is only requesting the directory in EPSV mode and when that is rejected it disconnects from the server. We can get the extract log on what happens during the C # program. Anyway, do you know if this is handled in the latest version, 9.3? We are trying to determine do we upgrade our current component (ICS), which we would prefer or purchase a new component, Thanks for all your help. Share this post Link to post
Angus Robertson 574 Posted Friday at 06:07 PM Extended Passive mode (EPSV) is for IPv6 connections, I'm not aware it has any purpose for IPv4 if that is what you are using. Never heard of active passive mode, can you please show the ICS FTP log. Angus Share this post Link to post
Remy Lebeau 1392 Posted Friday at 09:34 PM 3 hours ago, M-Brig said: The difference modes are Passive (PASV) and Extended Passive mode (EPSV). That makes more sense. 3 hours ago, M-Brig said: Anyway, do you know if this is handled in the latest version, 9.3? I just looked at the latest 9.3 source code, and no, I do not believe it does. For one thing, it is not checking if the server actually supports EPSV before sending that command. And second, it does not appear to switch to PASV when EPASV fails. Share this post Link to post
Remy Lebeau 1392 Posted Friday at 09:41 PM 3 hours ago, Angus Robertson said: Extended Passive mode (EPSV) is for IPv6 connections, I'm not aware it has any purpose for IPv4 if that is what you are using. EPSV is not limited to just IPv6, it can be used for IPv4 as well. But also, EPSV has another benefit even for IPv4 - it has a well-defined machine-parsable response text, whereas PASV does not. PASV responses are harder to parse since different servers use different formats for their reply text, and there are quite a few different formats in use in practice. Share this post Link to post
Angus Robertson 574 Posted yesterday at 09:46 AM It is up to the FTP client to decide whether to start passive mode with a PASV or EPSV command, the former has worked with IPv4 for decades, the latter is required for IPv6 so no check for availability is needed. None of this has changed in ICS in 15 years or more. I've never seen a server refuse a PASV request, even if it supports EPSV as well. It would need changes to the FTP client to prioritise EPSV over PASV, and I'm not likely to get to that for a few weeks. Angus Share this post Link to post