IBM i Global

IBM i Global

Connect, learn, share, and engage with IBM Power.

 View Only
  • 1.  Regarding FTP

    Posted Sat February 03, 2024 10:26 AM

    Hi,

    1)When trying to send/receive file using FileZilla it's neither moving (FTP is not successful) nor getting downloaded (in readable format) are there any settings changes need to be made to enable the same?

    2) What about CPYTOIMPF and CPYFRMIMPF commands do they serve the same pupose?

    3) Once I am connected inside IBM i then if i do FTP and get commands by default if FTP is successful where does it get downloaded?( any default directory path?)

    4) If i try to download any source member then using IBM i ACS why does it not get downloaded fully any changes in the IBM i ACS need to be done?

    5) WinSCP also serve the same purpose? ( i mean can we do FTP using it ? , is it free to download and use?

    Thanks



    ------------------------------
    jerry ven
    ------------------------------


  • 2.  RE: Regarding FTP

    Posted Sun February 04, 2024 02:05 AM

    Dear Jerry

    1) Which area of data in IBM i server are you trying to use FileZilla against - Db2 database objects in a library or stream files in an IBM i Integrated File System (IFS) folder ?   FileZilla does not work against DB2 objects because the objects are normally encoded in EBCDIC code which Windows or Linux or Unix do not recognize (unless DB2 file is declared to be encoded in ASCII or Uicode but this is rare in DB2i data). You can FTP them but most likely you will get garbage.  One of the reason the FTP is NOT moving as you said can be that your user ID does not have sufficient access authority to the file.

    2) CPYTOIMPF and CYPFROMIMPF are data export/import utility for DB2i. CPYTOIMPF exports Db2 table/physical file objects into stream files in fixed length or delimited format such as CSV files.  CPYFROMIMPF does the import.  IBM i ACS Data Transfer tool also works in similar way but it works between IBM i server and a client PC directly, no need for IBM i IFS folder involved.

    3) I think the answer is from FileZilla side and I have no idea.

    4) By "source member", you are referring to Source Physical File stored in DB2i. In such as case, it would be better for you to use IBM i ACS Data Transfer tool instead but first  make sure your use ID used to sign on to IBM i ACS connection does has proper read access authority to the physical file. 

    5) I do not know WInSCP. 

    It would be better for you to tell us by starting at what goal you want to achieve and supply relevant details of your environment you are dealing with. Then, after a few correspondences, we may provide relevant answers.



    ------------------------------
    Chance favors only the prepared mind.
    -- Louis Pasteur
    ------------------------------
    Satid S.
    ------------------------------



  • 3.  RE: Regarding FTP

    Posted Mon February 05, 2024 09:06 AM

    In my environment I connect my Windows workstation to my company VPN.  If I try to FTP from my workstation to an IBM i LPAR I'm able to connect, but as soon as I try to do a transfer (GET, PUT, or even LS) the attempt will timeout and disconnect.  If I need to get something up to the server from my workstation I'll use the ACS IFS plugin.  I wonder if it's a similar situation in your case.



    ------------------------------
    Steven Riedmueller
    Certified IBM i Admin
    Speaker, Mentor, and Advocate
    ------------------------------



  • 4.  RE: Regarding FTP

    Posted Tue February 06, 2024 05:29 AM

    Steven,

    FTP is a bit difficult in combination with a firewall - and your workstation VPN connection is going though your company firewall.

    The problem with FTP is that there are more than one channel in use:

    1. The control / command channel port 21 (which we all know)
    2. The data channel port, which is a random port dictated by the client or server (active vs passive mode)

    Your FTP login and commands are working, because they use port 21. But any data transmission (GET, PUT, LS etc) is prohibited by the firewall, because this is on another random port, and you experience timeout...

    The easiest way to get FTP working through the firewall is to use passive mode and let the server decide the port. Some FTP servers (e.g. GoAnywhere MFT, which runs on IBM i) have a setting telling which port range it will use - but I'm not familiar with such setting on the native FTP server on IBM i. You would then have to make the firewall allow that port range for outgoing rules - or for all ports outgoing, if the server has no range.

    Best regards,

    Christian



    ------------------------------
    Christian Jorgensen
    IT System Administrator
    Network of Music Partners A/S
    ------------------------------



  • 5.  RE: Regarding FTP

    Posted Wed February 07, 2024 01:43 AM

    Dear Christian

    >>>>  Some FTP servers (e.g. GoAnywhere MFT, which runs on IBM i) have a setting telling which port range it will use - but I'm not familiar with such setting on the native FTP server on IBM i. You would then have to make the firewall allow that port range for outgoing rules - or for all ports outgoing, if the server has no range. <<<<

    From a Google search, I found that as of IBM i 7.3 (with PTF), we can do this in IBM i FTP server using a new environment variable QIBM_FTP_PORT_RANGE :

    FTP server supports specifying a port range in the system level environmental variable QIBM_FTP_PORT_RANGE for data connections in passive mode. The port range value in QIBM_FTP_PORT_RANGE looks like this: 1-65535. The minimal valid port is 1 and the maximum valid port is 65535. It is suggested not using ports less than 1024 because the ports are reserved for system use. 



    ------------------------------
    Chance favors only the prepared mind.
    -- Louis Pasteur
    ------------------------------
    Satid S.
    ------------------------------



  • 6.  RE: Regarding FTP

    Posted Wed February 07, 2024 02:00 AM

    Dear Satid

    Thank you for googling this - I didn't know about the environment variable QIBM_FTP_PORT_RANGE! :-)

    And thank you for all your great answers in the IBM i Community forum - your sharing of your valuable insight is really appreciated.



    ------------------------------
    Christian Jorgensen
    IT System Administrator
    Network of Music Partners A/S
    ------------------------------



  • 7.  RE: Regarding FTP

    Posted Wed February 07, 2024 02:10 AM
    Edited by Satid Singkorapoom Wed February 07, 2024 02:15 AM

    Dear Christian

    I thank you for your kind words. I consider myself having less insights than curiosity and when combining it with Google (and other  search engines), good results have been achieved so far. 



    ------------------------------
    Chance favors only the prepared mind.
    -- Louis Pasteur
    ------------------------------
    Satid S.
    ------------------------------



  • 8.  RE: Regarding FTP

    Posted Thu February 08, 2024 07:43 AM

    I tried to get in contact with Satid, off community, and failed.  I really wanted to nominate him for an IBM Champion.  I believe he is no longer an IBM employee and therefore is eligible.  I needed an email address.



    ------------------------------
    Robert Berendt IBMChampion
    ------------------------------



  • 9.  RE: Regarding FTP

    Posted Fri February 09, 2024 01:31 AM
    Edited by Satid Singkorapoom Fri February 09, 2024 01:32 AM

    Dear Robert

    I thank you for your good intention for me but I seek no further status.  I'm content with being just a member of this community. 



    ------------------------------
    Chance favors only the prepared mind.
    -- Louis Pasteur
    ------------------------------
    Satid S.
    ------------------------------