Inbound fileset-FTP throwing 500 error when requesting directory contents

Clovertech Forums Cloverleaf Inbound fileset-FTP throwing 500 error when requesting directory contents

  • Creator
    Topic
  • #119480
    Mike Strout
    Participant

      I am trying to pull files off a Globalscape FTP server using Cloverleaf’s fileset-FTP protocol. I’ve tested from the command line of the Cloverleaf server (running on AIX) and I am able to list files on the Globalscape server using ls, dir, and nlist, though ls gives a nice concise list of files without all the associated meta data for the file(s). I was also able to get and put just fine from and to the server.

      However, when I try to connect via a fileset-FTP protocol thread on Cloverleaf, Globalscape returns the following…

      < 220 EFT Login – Wednesday, 1/5/2022 3:09:43 PM – Please enter valid credentials to continue
      > USER valid_username
      < 331 Password required for valid_username.
      > PASS ********
      < 230 Login OK. Proceed.
      > PWD
      < 257 “/” is current folder.
      * Entry path is ‘/’
      > EPSV
      * Connect data stream passively
      * ftp_perform ends with SECONDARY: 0
      < 229 Entering Extended Passive Mode (|||59741|)
      * Trying valid_IP_Address…
      * TCP_NODELAY set
      * Connecting to valid_IP_Address (valid_IP_Address) port 59741
      * Connected to valid_IP_Address (valid_IP_Address) port 21 (#0)
      > TYPE A
      < 200 Type set to A.
      > nlist
      < 500 ‘NONE’: command not understood.
      * RETR response: 500
      * Remembering we are in dir “”
      * Connection #0 to host valid_IP_Address left intact
      [fset:read:ERR /0:2_m_nkply_ftp_i:01/05/2022 15:09:43] Error while trying to get directory listing.
      [fset:read:ERR /0:2_m_nkply_ftp_i:–/–/—- –:–:–] Detailed error:RETR response: 500
      [fset:read:ERR /0:2_m_nkply_ftp_i:–/–/—- –:–:–] Curl errCode:19 Curl error:FTP: couldn’t retrieve (RETR failed) the specified file
      [pd :pdtd:INFO/1:2_m_nkply_ftp_i:01/05/2022 15:09:43] Set driver status to PD_STATUS_OPENING
      [msg :Msg :DBUG/0:2_m_nkply_ftp_i:01/05/2022 15:09:45] msgFree 0xefff6e28 refCnt 1
      [pd :pdtd:INFO/1:2_m_nkply_ftp_i:01/05/2022 15:09:45] Set driver status to PD_STATUS_ERROR

      To try and find what command I can use to get a list of files in the directory, I set Dir List Command to “help” and then looked at the process log and got the following…

      help
      < 214-The following commands are recognized:
      < ABOR
      < ACCT
      < ALLO
      < APPE
      < AUTH
      < CDUP
      < CWD
      < DELE
      < FEAT
      < HELP
      < LIST
      < MKD
      < MLSD
      < MLST
      < MODE
      < NLST
      < NOOP
      < OPTS
      < PASS
      < PASV
      < PBSZ
      < PORT
      < PROT
      < PWD
      < QUIT
      < REIN
      < REST
      < RETR
      < RMD
      < RNFR
      < RNTO
      < SITE
      < SIZE
      < SMNT
      < STAT
      < STOR
      < STOU
      < STRU
      < SYST
      < TYPE
      < USER
      < XCUP
      < XCWD
      < XMKD
      < XPWD
      < XRMD
      < EPRT
      < EPSV
      < MDTM
      < MFMT
      < CCC
      < SSCN
      < XNOP
      < LANG
      < CLNT
      < 214-The special commands are recognized:
      < COMB
      < XCRC
      < 214 HELP command successful.

      It seems nlist is a valid command as far as Globalscape is concerned, unless Cloverleaf issues it.

      Even if nlist worked, I think it would give me something like this…

      ftp> nlist
      -rw-rw-rw- 1 user group 93043 Dec 30 2021 polysmith_hl7

      Am I correct in assuming that I would have to add a tcl proc in the Directory Parse field so I get a concise list of filenames the protocol the iterates through?

      Thanks in advance,
      Mike Strout

    Viewing 3 reply threads
    • Author
      Replies
      • #119481
        Peter Heggie
        Participant

          I don’t want to suggest a wrong direction, but just in case this is a security issue, do you get the same error when the target directory is a subfolder of the root (home) folder vs. the root (home) folder? Sometimes the access rights are different.

          But also, the list vs nlist vs nlst issue – I think I ran into that a long time ago, don’t remember what I did.. but there may be some direction in older Clovertech posts?

          Peter Heggie

        • #119482
          Ab Lugtenburg
          Participant

            Hi Mike,

            I saw this in an other case on our cloverleaf , first you have to find out is the command in upper or lowercase

            Further on teh tab FTP options you can find a “Dir list Command” box here you can put in the right command to use

            In my case here i found the solution

          • #119483
            Jim Kosloskey
            Participant

              Regarding the dirparse question, once you get the correct command to get the file list (I think that would be NLST based on your post) you should get the filenames in a list (including the path if I recall correctly – unless you specify extended data then you will get more information) just as you would from say a FILESET/LOCAL protocol.

              email: jim.kosloskey@jim-kosloskey.com 29+ years Cloverleaf, 59 years IT - old fart.

            • #119485
              Mike Strout
              Participant

                Thanks to all for your thoughts. Ab got me on the right track thinking about CaSe. I looked at the list of allowable commands and saw that all the commands were UPPER case. I made the change and tested. Error again!

                Then I saw Peter’s replay where he mentioned “list vs nlist vs nlst”. I wondered what is the difference between the list to and realized that in all the threads fileset-ftp threads that we currently use, the list command is nlist, so that was stuck in my mind. I looked more carefully at the output from help and the resolution was clear…

                help
                < 214-The following commands are recognized:

                < NLST

                So much angst for one letter. We’ve all done things like this before and it just takes someone with a little perspective to see the glaring error.

                Thanks all for your quick support!
                Mike Strout

            Viewing 3 reply threads
            • You must be logged in to reply to this topic.