No announcement yet.

FTP retrieve directory command

  • Time
  • Show
Clear All
new posts

  • FTP retrieve directory command

    Is there a way to for the user to set the command used to retrieve directory listings from a FTP (FTPS) site?

    Not sure what changed (could be on their site), but BC has stopped working when trying to compare against this specific FTPS site.

    BC hangs on the 'Here comes the directory listing' (from the log):

    8/12/2009 4:15:00 PM  Sent> TYPE A
    8/12/2009 4:15:00 PM  Recv> 200 Switching to ASCII mode.
    8/12/2009 4:15:00 PM  Sent> PBSZ 0
    8/12/2009 4:15:00 PM  Recv> 200 PBSZ set to 0.
    8/12/2009 4:15:00 PM  Sent> PROT P
    8/12/2009 4:15:00 PM  Recv> 200 PROT now Private.
    8/12/2009 4:15:00 PM  Sent> PASV
    8/12/2009 4:15:00 PM  Recv> 227 Entering Passive Mode (192,168,41,78,8,83)
    8/12/2009 4:15:01 PM  Sent> LIST
    8/12/2009 4:15:01 PM  Recv> 150 Here comes the directory listing.
    After about 30 seconds, it gives up and shows the following:

    8/12/2009 3:34:27 PM  Recv> 226 Directory send OK.
    8/12/2009 3:34:27 PM  Unable to load ftps://[email protected]/dma/headshots/TGA: Read timed out.
    FYI, FireFTP used to work on this site, and is now having troubles also...

    However FlashFXP (the client software this FTP site recommends) still works.

    FlashFXP uses STAT -la to retrieve the directory listing:

    [16:18:47] [R] 200 Switching to ASCII mode.
    [16:18:47] [R] STAT -la
    [16:18:48] [R] List Complete: 24 KB in 1.53 second (15.8 KB/s)

    So, I'm wondering if I changed BC to use 'STAT -la' it may solve my problem...

    Any ideas?

  • #2
    Hi Rob,

    First of all it would be interesting which server software is used on the server. Usually it is displayed in the welcome-message when you login.

    For deeper diagnostics you can increase the log activity of BC3. Unless already done activate all checkboxes at "Options -> Folder Views -> Log messages".

    And as a special option you can activate debugging messages for FTP commands: Press <shift><crtl><t> to invoke the "Tweaks" dialog an go to the Folder View pane. Here check the debugging option for the log.

    Hope this helps ...



    • #3
      Hi Rob,

      Open the FTP Profile for the site you're trying to connect to and try unchecking "Passive Mode" or checking "Clear Control Channel". Both are on the "Connection" tab.

      BC does not support using "STAT" to get the directory listing, and adding it won't help you. Normally FTP involves two connections to the server, one to send commands and one to send file data and directory listings. Using the "STAT" command just means the directory listing comes back on the command connection instead of opening a data connection. Even if that works, you still wouldn't be able to actually upload/download files.
      Zoë P Scooter Software


      • #4
        Thanks Christoph & Craig for your replies and suggestions.

        I have all logging enabled, and also tried the options Craig suggested. Here's my results:

        Server Software/Version:
        8/13/2009 10:46:46 AM Recv> 220 (vsFTPd 2.0.1)

        With PASV unchecked, I get the following:
        8/13/2009 10:49:07 AM Sent> PORT 172,20,1,30,5,191
        8/13/2009 10:49:07 AM Recv> 500 Illegal PORT command.

        It doesn't look like the server supports "Clear Control Channel". When I turn check it, I see the following:

        8/13/2009 11:00:10 AM Sent> CCC
        8/13/2009 11:00:11 AM Recv> 500 Unknown command.

        Does this offer any clues? I guess CCC is not supported, but not sure what the PORT cmd error message indicates.


        • #5
          vsFTPd supports disabling the PORT command, so that's why it's giving the 500 error message there. Can you download files with FlashFXP, and if so, what does the log look like there?
          Zoë P Scooter Software


          • #6
            Yes, i can download w/ FlashFXP. I'll e-mail the log file to you.

            Also, just to clarify, BC has been working great with this server until some time over the last week...


            • #7
              I just updated to 3.1.8 and this is happening again...


              • #8

                You said in email that your client had downgraded their FTP server and that you weren't seeing the other (32KB) issue. What version are they running now?
                Zoë P Scooter Software


                • #9
                  The version reported in the BC trace log is:
                  11/16/2009 1:50:22 PM Recv> 220 (vsFTPd 2.0.1)

                  However, I think it's always said this version -- even for the times BC worked fine, and also for the times BC didn't work.

                  I'm heading to a meeting now, but if there's anything else you want me to try, let me know and I'll get back to you later this afternoon.

                  Here's an example with 3.1.8 where it gets cut off:
                  11/16/2009 1:42:58 PM -rwxrws--- 1 10005 10350 621548 Mar 06 2009 HDS_26331_SchwartzelCHA.tga
                  11/16/2009 1:42:58 PM -rwxrwx--- 1 10005 10350 621548 Jul 13 20:44 HDS_26341_ormsbywad.tga
                  11/16/2009 1:42:58 PM -rwxrwx--- 1 10005
                  11/16/2009 1:42:59 PM FTP ParserID: Unix


                  • #10
                    I was checking back here to see if there were any updates to this... However, it looks like our client updated their FTP server version

                    12/1/2009 9:48:11 AM Recv> 220 (vsFTPd 2.0.5)

                    And now BC (3.1.8) can sucessfully connect and retrieve directory listings.

                    However, it looks like I'm still getting some of my transfers truncated at filesize multiples of 32k. Sometimes if I retry the same transfer the complete file gets sent over. However, there's still one file that I keep transferring and it always gets truncated. (I'll move this conversation over to that thread)...