[OT] FTP client problems
Folks, I'm getting conflicting behaviour in FTP clients on our new server. We installed an app in this new server and it died attempting to GET a file from a remote FTP server. So I ran ftp.exe from the command prompt to do the same thing as the app does in code to see what happens (thinking that ftp.exe is a nice vanilla test). It takes my user and password okay, but an 'ls' command says 501 Server cannot accept argument. I tried PASV mode and it does the same thing. Next test from Windows Explorer asks for my credentials and then lists the FTP server's file okay. So that's weird ... the app and ftp.exe fail, but Windows Explorer works. Can anyone suggest why? Different authentication modes? This is a serious problem that has stopped the rollout of the app. Greg K P.S. I know that FTP is ancient, but it's being used for historical reasons. I've told the app's author to use HTTP instead and have supplied some sample code.
RE: [OT] FTP client problems
Are you using ISA or some other firewall/proxy? That's generally what causes a 501 Best bet is to wireshark the process and attach the cap - very hard to figure it out otherwise. From: ozdotnet-boun...@ozdotnet.com [mailto:ozdotnet-boun...@ozdotnet.com] On Behalf Of Greg Keogh Sent: Thursday, 17 October 2013 9:28 AM To: ozDotNet Subject: [OT] FTP client problems Folks, I'm getting conflicting behaviour in FTP clients on our new server. We installed an app in this new server and it died attempting to GET a file from a remote FTP server. So I ran ftp.exeftp://ftp.exe from the command prompt to do the same thing as the app does in code to see what happens (thinking that ftp.exeftp://ftp.exe is a nice vanilla test). It takes my user and password okay, but an 'ls' command says 501 Server cannot accept argument. I tried PASV mode and it does the same thing. Next test from Windows Explorer asks for my credentials and then lists the FTP server's file okay. So that's weird ... the app and ftp.exeftp://ftp.exe fail, but Windows Explorer works. Can anyone suggest why? Different authentication modes? This is a serious problem that has stopped the rollout of the app. Greg K P.S. I know that FTP is ancient, but it's being used for historical reasons. I've told the app's author to use HTTP instead and have supplied some sample code.
Re: [OT] FTP client problems
*blink blink* ... Jorke... says to wireshark the giglyhertz so the megatwatts can access the mother fruggles... :) :D --- Regards, Scott Barnes http://www.riagenic.com On Thu, Oct 17, 2013 at 8:44 AM, Jorke Odolphi jo...@jorke.net wrote: Are you using ISA or some other firewall/proxy? That’s generally what causes a 501 ** ** Best bet is to wireshark the process and attach the cap – very hard to figure it out otherwise. ** ** *From:* ozdotnet-boun...@ozdotnet.com [mailto: ozdotnet-boun...@ozdotnet.com] *On Behalf Of *Greg Keogh *Sent:* Thursday, 17 October 2013 9:28 AM *To:* ozDotNet *Subject:* [OT] FTP client problems ** ** Folks, I'm getting conflicting behaviour in FTP clients on our new server. We installed an app in this new server and it died attempting to GET a file from a remote FTP server. So I ran ftp.exe from the command prompt to do the same thing as the app does in code to see what happens (thinking that ftp.exe is a nice vanilla test). It takes my user and password okay, but an 'ls' command says 501 Server cannot accept argument. I tried PASV mode and it does the same thing. Next test from Windows Explorer asks for my credentials and then lists the FTP server's file okay. So that's weird ... the app and ftp.exe fail, but Windows Explorer works. Can anyone suggest why? Different authentication modes? This is a serious problem that has stopped the rollout of the app. Greg K P.S. I know that FTP is ancient, but it's being used for historical reasons. I've told the app's author to use HTTP instead and have supplied some sample code.
Re: [OT] FTP client problems
Try again with FileZilla and set the FTP mode to Active and try again. David. David Connors da...@connors.com | M +61 417 189 363 Download my v-card: https://www.codify.com/cards/davidconnors Follow me on Twitter: https://www.twitter.com/davidconnors Connect with me on LinkedIn: http://au.linkedin.com/in/davidjohnconnors On Thu, Oct 17, 2013 at 8:44 AM, Jorke Odolphi jo...@jorke.net wrote: Are you using ISA or some other firewall/proxy? That’s generally what causes a 501 ** ** Best bet is to wireshark the process and attach the cap – very hard to figure it out otherwise. ** ** *From:* ozdotnet-boun...@ozdotnet.com [mailto: ozdotnet-boun...@ozdotnet.com] *On Behalf Of *Greg Keogh *Sent:* Thursday, 17 October 2013 9:28 AM *To:* ozDotNet *Subject:* [OT] FTP client problems ** ** Folks, I'm getting conflicting behaviour in FTP clients on our new server. We installed an app in this new server and it died attempting to GET a file from a remote FTP server. So I ran ftp.exe from the command prompt to do the same thing as the app does in code to see what happens (thinking that ftp.exe is a nice vanilla test). It takes my user and password okay, but an 'ls' command says 501 Server cannot accept argument. I tried PASV mode and it does the same thing. Next test from Windows Explorer asks for my credentials and then lists the FTP server's file okay. So that's weird ... the app and ftp.exe fail, but Windows Explorer works. Can anyone suggest why? Different authentication modes? This is a serious problem that has stopped the rollout of the app. Greg K P.S. I know that FTP is ancient, but it's being used for historical reasons. I've told the app's author to use HTTP instead and have supplied some sample code.
RE: [OT] FTP client problems
http://i.imgur.com/5sRt9Hh.gif From: ozdotnet-boun...@ozdotnet.com [mailto:ozdotnet-boun...@ozdotnet.com] On Behalf Of Greg Keogh Sent: Thursday, 17 October 2013 2:47 PM To: ozDotNet Subject: Re: [OT] FTP client problems 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. The latter I haven't used for more than a year and it's complicated and I'll have to configure it and interpret the results. I guess it's Wireshark then. Greg K Scott, I'm sending a prescription repeat to help your condition. On 17 October 2013 11:25, David Connors da...@connors.commailto:da...@connors.com wrote: Try again with FileZilla and set the FTP mode to Active and try again. David. David Connors da...@connors.commailto:da...@connors.com | M +61 417 189 363 Download my v-card: https://www.codify.com/cards/davidconnors Follow me on Twitter: https://www.twitter.com/davidconnors Connect with me on LinkedIn: http://au.linkedin.com/in/davidjohnconnors On Thu, Oct 17, 2013 at 8:44 AM, Jorke Odolphi jo...@jorke.netmailto:jo...@jorke.net wrote: Are you using ISA or some other firewall/proxy? That's generally what causes a 501 Best bet is to wireshark the process and attach the cap - very hard to figure it out otherwise. From: ozdotnet-boun...@ozdotnet.commailto:ozdotnet-boun...@ozdotnet.com [mailto:ozdotnet-boun...@ozdotnet.commailto:ozdotnet-boun...@ozdotnet.com] On Behalf Of Greg Keogh Sent: Thursday, 17 October 2013 9:28 AM To: ozDotNet Subject: [OT] FTP client problems Folks, I'm getting conflicting behaviour in FTP clients on our new server. We installed an app in this new server and it died attempting to GET a file from a remote FTP server. So I ran ftp.exeftp://ftp.exe from the command prompt to do the same thing as the app does in code to see what happens (thinking that ftp.exeftp://ftp.exe is a nice vanilla test). It takes my user and password okay, but an 'ls' command says 501 Server cannot accept argument. I tried PASV mode and it does the same thing. Next test from Windows Explorer asks for my credentials and then lists the FTP server's file okay. So that's weird ... the app and ftp.exeftp://ftp.exe fail, but Windows Explorer works. Can anyone suggest why? Different authentication modes? This is a serious problem that has stopped the rollout of the app. Greg K P.S. I know that FTP is ancient, but it's being used for historical reasons. I've told the app's author to use HTTP instead and have supplied some sample code.
Re: [OT] FTP client problems
On Thu, Oct 17, 2013 at 1:47 PM, Greg Keogh g...@mira.net 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.
Re: [OT] FTP client problems
Windows explorer uses pasv, command line does not. On 17/10/2013 3:10 PM, Greg Keogh g...@mira.net wrote: I haven't tried FileZilla yet, but in Wireshark I have a trace of FTP failing from the command prompt and a trace working from Windows Explorer. As I expected, the results are so different that I can't compare them. The Windows Explorer trace is much longer and contains dozens of lines that are gibberish to me as I'm not a networking guy. So I now have traces of one working and one failing, but I'm unable to interpret or compare the results and I've learned nothing. Greg K On 17 October 2013 15:01, David Connors da...@connors.com wrote: On Thu, Oct 17, 2013 at 1:47 PM, Greg Keogh g...@mira.net 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.
RE: [OT] FTP client problems
Did you miss this step from Jorke's post? ...and attach the cap Cheers Ken From: ozdotnet-boun...@ozdotnet.com [mailto:ozdotnet-boun...@ozdotnet.com] On Behalf Of Greg Keogh Sent: Thursday, 17 October 2013 4:11 PM To: ozDotNet Subject: Re: [OT] FTP client problems I haven't tried FileZilla yet, but in Wireshark I have a trace of FTP failing from the command prompt and a trace working from Windows Explorer. As I expected, the results are so different that I can't compare them. The Windows Explorer trace is much longer and contains dozens of lines that are gibberish to me as I'm not a networking guy. So I now have traces of one working and one failing, but I'm unable to interpret or compare the results and I've learned nothing. Greg K On 17 October 2013 15:01, David Connors da...@connors.commailto:da...@connors.com wrote: On Thu, Oct 17, 2013 at 1:47 PM, Greg Keogh g...@mira.netmailto:g...@mira.net 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.
Re: [OT] FTP client problems
Did you miss this step from Jorke’s post? Yeah, look, it's not Friday and I'm up shit creek -- Greg
Re: [OT] FTP client problems
Re: prescription - it isn't polite to make fun of people with mental illnesses. http://www.riagenic.com/archives/934 Joseph On 17 Oct 2013 13:47, Greg Keogh g...@mira.net 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. The latter I haven't used for more than a year and it's complicated and I'll have to configure it and interpret the results. I guess it's Wireshark then. Greg K Scott, I'm sending a prescription repeat to help your condition. On 17 October 2013 11:25, David Connors da...@connors.com wrote: Try again with FileZilla and set the FTP mode to Active and try again. David. David Connors da...@connors.com | M +61 417 189 363 Download my v-card: https://www.codify.com/cards/davidconnors Follow me on Twitter: https://www.twitter.com/davidconnors Connect with me on LinkedIn: http://au.linkedin.com/in/davidjohnconnors On Thu, Oct 17, 2013 at 8:44 AM, Jorke Odolphi jo...@jorke.net wrote: Are you using ISA or some other firewall/proxy? That’s generally what causes a 501 ** ** Best bet is to wireshark the process and attach the cap – very hard to figure it out otherwise. ** ** *From:* ozdotnet-boun...@ozdotnet.com [mailto: ozdotnet-boun...@ozdotnet.com] *On Behalf Of *Greg Keogh *Sent:* Thursday, 17 October 2013 9:28 AM *To:* ozDotNet *Subject:* [OT] FTP client problems ** ** Folks, I'm getting conflicting behaviour in FTP clients on our new server. We installed an app in this new server and it died attempting to GET a file from a remote FTP server. So I ran ftp.exe from the command prompt to do the same thing as the app does in code to see what happens (thinking that ftp.exe is a nice vanilla test). It takes my user and password okay, but an 'ls' command says 501 Server cannot accept argument. I tried PASV mode and it does the same thing. Next test from Windows Explorer asks for my credentials and then lists the FTP server's file okay. So that's weird ... the app and ftp.exe fail, but Windows Explorer works. Can anyone suggest why? Different authentication modes? This is a serious problem that has stopped the rollout of the app. Greg K P.S. I know that FTP is ancient, but it's being used for historical reasons. I've told the app's author to use HTTP instead and have supplied some sample code.
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 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 da...@connors.com wrote: On Thu, Oct 17, 2013 at 1:47 PM, Greg Keogh g...@mira.net 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.