Hi Everyone,
I'm running into an issue with FTP_list in FTPAPI — the call locks up, then eventually disconnects due to a timeout.
I traced the problem by testing directly from the command prompt. Running ls to produce a file listing would always hang and eventually disconnect.
Here’s the relevant portion of the log:
Unix Version: FTP server
cd /download
250 CWD command successful
ls
229 Entering Extended Passive Mode (|||20911|)
Using the command sendepsv 0 before running ls resolved the issue — the client entered normal passive mode instead of extended passive (EPSV).
I then forced the FTP client to never use EPSV by creating a data area:
CRTDTAARA DTAARA(QUSRSYS/QTMFTPEPSV) TYPE(*LGL) AUT(*USE)
After this, I no longer had to manually use sendepsv 0; all connections defaulted to standard passive mode.
However, I don’t see an option in FTPAPI to disable EPSV.
Does anyone know how to force FTPAPI to use standard passive mode instead of EPSV, or another workaround?
Thanks in advance!
Turning off Extended Passive Mode
Re: Turning off Extended Passive Mode
Hi
Version 2.6 has support for enhanced, as stated in the CHANGELOG.TXT - "Added support for enhanced (EPSV, EPRT) data channel commands"
This version is available at https://github.com/ScottKlement/ftpapi
Regards
Vern
Version 2.6 has support for enhanced, as stated in the CHANGELOG.TXT - "Added support for enhanced (EPSV, EPRT) data channel commands"
This version is available at https://github.com/ScottKlement/ftpapi
Regards
Vern
Re: Turning off Extended Passive Mode
I'm using V2.8
My issue is that it is using EPSV, The server I need to connect to does not appear to be able to handle it.
Doing it manually without FTPAPI involved has the same issue until I force the IBM I FTP Client to not use EPSV.
Once that is done, it happily sends back my file listing. I need to know how do the same thing to FTPAPI... or if it is currently not possible.
My issue is that it is using EPSV, The server I need to connect to does not appear to be able to handle it.
Doing it manually without FTPAPI involved has the same issue until I force the IBM I FTP Client to not use EPSV.
Once that is done, it happily sends back my file listing. I need to know how do the same thing to FTPAPI... or if it is currently not possible.
-
Scott Klement
- Site Admin
- Posts: 968
- Joined: Sun Jul 04, 2021 5:12 am
Re: Turning off Extended Passive Mode
FTPAPI automatically attempts to downgrade from EPSV to PASV if the server doesn't understand EPSV.
Re: Turning off Extended Passive Mode
Thanks Scott,
This vendors server is not giving me a chance... it just locks and disconnects.
So hopefully my situation will give you something to put in V2.9
In mean time I rewrote my program to do it the old fashion way using a script writer with CL Command call to the Native FTP client.
It works... but not as clean to read as using FTPAPI.
I sincerely appreciate being able to use it.
This vendors server is not giving me a chance... it just locks and disconnects.
So hopefully my situation will give you something to put in V2.9
In mean time I rewrote my program to do it the old fashion way using a script writer with CL Command call to the Native FTP client.
It works... but not as clean to read as using FTPAPI.
I sincerely appreciate being able to use it.
-
Scott Klement
- Site Admin
- Posts: 968
- Joined: Sun Jul 04, 2021 5:12 am
Re: Turning off Extended Passive Mode
If the server locks up when it receives a command it doesn't understand, that's a bug in the server, not a bug in FTPAPI.