Bottom line, as David said - you're out of luck if you want a passive transfer from ftp.exe<ftp://ftp.exe>
you can type 'pasv', 'quote pasv' as much as you want but ftp.exe<ftp://ftp.exe> will just set it back to active - I think it's a port command or similar - if you want to verify this just type 'debug' and you'll see what is sent to the server. IE works because it uses passive - but you can turn that off and verify active is broken under the "advanced options" From: [email protected] [mailto:[email protected]] On Behalf Of Greg Keogh Sent: Thursday, 17 October 2013 4:52 PM To: ozDotNet Subject: Re: [OT] FTP client problems David, FileZilla works perfectly by default and lists the files and I can see the following in the trace (pasted below). What it's doing seems to make sense, but if I try similar requests from the command prompt (including the PASV) I still get "501 Server cannot accept argument" when I attempt to list or get files. So although I can now see Windows Explorer and FileZilla all listing files on the FTP server, I can't do the same from the command prompt. The point of all this simulation from the command prompt is that if I get it working I can then tell the C++ programmer exactly what steps I performed in the hope he can do the same from his code and overcome our problem. Greg K ===================== Status: Resolving address of ftp.#######.com<ftp://ftp.#######.com> Status: Connecting to ###.50.142.77:21... Status: Connection established, waiting for welcome message... Response: 220 Microsoft FTP Service Command: USER ###### Response: 331 Password required for ######. Command: PASS ******** Response: 230-Welcome to the #######.com FTP service on the dedicated ##### server. Response: 230 User logged in. Command: SYST Response: 215 Windows_NT Command: FEAT Response: 211-Extended features supported: Response: LANG EN* Response: UTF8 Response: AUTH TLS;TLS-C;SSL;TLS-P; Response: PBSZ Response: PROT C;P; Response: CCC Response: HOST Response: SIZE Response: MDTM Response: REST STREAM Response: 211 END Command: OPTS UTF8 ON Response: 200 OPTS UTF8 command successful - UTF8 encoding now ON. Status: Connected Status: Retrieving directory listing... Command: PWD Response: 257 "/" is current directory. Command: TYPE I Response: 200 Type set to I. Command: PASV Response: 227 Entering Passive Mode (###,50,142,77,203,156). Command: LIST Response: 150 Opening BINARY mode data connection. Response: 226 Transfer complete. Status: Calculating timezone offset of server... Command: MDTM 23456781.rlf Response: 213 20111220002502 Status: Timezone offsets: Server: -25200 seconds. Local: 0 seconds. Difference: 25200 seconds. Status: Directory listing successful On 17 October 2013 15:01, David Connors <[email protected]<mailto:[email protected]>> wrote: On Thu, Oct 17, 2013 at 1:47 PM, Greg Keogh <[email protected]<mailto:[email protected]>> wrote: Chaps, FileZilla or Wireshark! The former I haven't used and I won't learn anything if works or nor, unless it has some tracing facility. You will learn exactly what the problem is. If it works with FileZilla using passive FTP then the problem is your firewall. Windows command-line FTP is active by default. With active FTP the server opens the data connection to you which is blocked unless you have a firewall that does stateful inspection. WIth passive FTP the client opens the data connection and that will work by default in most NAT/firewalls even without stateful inspection. David.
