Menu

#55 NppFTP crashes, when connect

open
nobody
None
5
2014-03-15
2012-11-03
Anonymous
No

220 ::ffff:1.2.3.4 FTP server ready
USER 123456
331 Password required for 123456
PASS 654321
230 Welcome to your web hosting account!Please upload your web site inside the directory of the respective hostname.(If you wish to upload outside the hostname directories or delete them please make sure Directory Protection is set to OFF from your hosting control panel - File Manager section)
TYPE A
200 Type set to A
MODE S
200 Mode set to S
STRU F
200 Structure set to F
PWD
257 "/" is the current directory
---crash Npp-----

Discussion

  • Craig

    Craig - 2013-10-17

    Also having this problem which I think is actually the same for bug reports 55, 47 and 33. Npp crashes after NppFTP receives the 257 current directory response. This occurred with both 0.24 Unicode (packaged w/Npp) and the newer 0.25 Unicode versions of NppFTP. Happens when connecting to an IBM i (i/OS, i Series, AS/400) system that has the packaged FTP server running, but not when connecting to a server (unknown OS) running vsFTPd v2.0.5. Not sure if this is a clue, but I will note that the 257 response from vsFTPd is 257 "/" whereas the response I get from the IBM i is 257 "QGPL" is current library. My log, this ticket and ticket 47 all have 257 response strings that include additional text beyond what the quoted directory is. If needed I may be able to open a connection for you to test with to an older IBM i system running I think v4.5. Won't be apples-to-apples but may provide something to work with.

    In some FTP clients I've found that it is necessary to allow user customizable commands to run prior to getting the directory list. For example, the default with the IBM i FTP server is to put the user into the "QSYS Library" type filesystem. This is something not understood by many clients, and requires them to first get into the Unix-like Integrated File System (IFS). This is done by issuing the command quote site namefmt 1 prior to requesting the directory listing. I don't know that this is related to the problem but it should be food for thought as a possible enhancement.

    I've found Npp a great utility for tasks I'm working with, having NppFTP working properly with IBM i would be a time saving bonus. Hope this can be resolved.

     
  • Craig

    Craig - 2014-03-14

    Well my suspicion was wrong. Found another server to connect to that had strings after the quoted current directory, no crash.

    -> USER anonymous
    331 Password required for anonymous.
    -> PASS HIDDEN
    230 Virtual user anonymous logged in.
    -> TYPE A
    200 Type set to A.
    -> MODE S
    200 MODE S ok.
    -> STRU F
    200 STRU F ok.
    -> PWD
    257 "/" is current directory.
    Connected
    -> CWD /
    250 CWD command successful.

     
  • Craig

    Craig - 2014-03-15

    For the i5 platform I have found good success in accessing the IFS data if the FTP server is set with the following: initial name format = path format, initial directory = user home directory, initial list format = Unix style. Defaults are usually name format of library/file.member, initial directory of user's current library, and list format of default (IBM i format). The command to set those on the i5 is: CHGFTPA NAMEFMT(PATH) CURDIR(HOMEDIR) LISTFMT(*UNIX)

    With only the name format changed from default can I get past the PWD 257 response.

    With the name format changed and the and the list format changed I can get past the LIST 250 response. Doesn't seem to be happy with trying to transfer file members though.

    With the name format changed and the, the list format changed and the current directory set to the home directory I can navigate and transfer files around the IFS file system normally. While one can navigate the IFS path into the platform's other filesystems (library QSYS.LIB filesystem, QDLS document library filesystem, etc.) I didn't attempt that with NppFTP. At any rate, changing our FTP server to these default settings isn't something most shops are prepared or able to do. I can get past the initial PWD problem by specifying an IFS directory (e.g., "/home") as my initial directory (forces the path name format) but because NppFTP doesn't seem to like the IBM i platform formatted LIST response it doesn't know what is actually in the folder. Trying to navigate around will eventually crash it out. If there were the ability to insert commands to be run early on in the process (based on what I see from the commands that automatically run, immediately after STRU but as early as after password authentication) that would allow i5 shops easy access to the IFS portion of their systems. The commands:
    QUOTE SITE NAMEFMT 1
    and
    QUOTE SITE LISTFMT 1
    could be sent that would take care of the formatting that NppFTP doesn't like. Still may run into the initial directory issue but that can already be worked around via the field of that name in the NppFTP connection profile. I would imagine this would be an easier fix and could potentially get many shops a workaround to the crashes. May not provide full functionality with the server but it could buy more time before more in-depth research needs to be performed.