cURL / Mailing Lists / curl-users / Single Mail

curl-users

FTPS over HTTP proxy unable to setup data connection

From: Amit Umbarkar <aumbarka_at_sscinc.com>
Date: Tue, 9 Jun 2015 15:35:01 +0000

I am trying to post a file on FTPS site via HTTP proxy using "implicit" method. Though am able to login & change directories, but hitting upon "* FTP response reading failed" error on each attempt of file STOR command. Here are the detailed logs -

/home$ curl --user xxxx:xxxx --tlsv1 --disable-epsv --show-error -Q "CWD inbound" -Q "TYPE I" -Q PWD -Q PASV -Q "STOR abc.txt" --verbose --proxytunnel -x proxy.xyz.com:80 ftps://ftpssl.rbc.com
* About to connect() to proxy.xyz.com port 80
* Trying 172.19.111.118... * connected
* Connected to proxy.xyz.com (172.19.111.118) port 80
* Establish HTTP proxy tunnel to ftpssl.rbc.com:990
* Proxy auth using (nil) with user ''
* Server auth using Basic with user 'xxxx'
< HTTP/1.0 200 Connection established
<
* Proxy replied OK to CONNECT request
* successfully set certificate verify locations:
* CAfile: /usr/share/ssl/certs/ca-bundle.crt
  CApath: none
* SSL connection using RC4-MD5
* Server certificate:
* subject: /C=CA/ST=Ontario/L=Toronto/O=Royal Bank of Canada/OU=B2Bnetsp20/CN=ftpssl.rbc.com
* start date: 2012-07-03 00:00:00 GMT
* expire date: 2015-07-03 23:59:59 GMT
* subjectAltName: ftpssl.rbc.com matched
* issuer: /C=US/O=VeriSign, Inc./OU=VeriSign Trust Network/OU=Terms of use at https://www.verisign.com/rpa (c)10/CN=VeriSign Class 3 Secure Server CA - G3
* SSL certificate verify ok.
< 220 RBCNG FTPS (Version Tue Jun 9 10:40:06 2015) server ready.
> USER xxxx
< 331 Password required for xxxx.
> PASS xxxx
< 230 User xxxx logged in.
* We have successfully logged in
> PBSZ 0
< 502 PBSZ Command not implemented.
> PWD
< 257 "/usr/nn/gateway/mbox/fxf/xxxx" is current directory.
* Entry path is '/usr/nn/gateway/mbox/fxf/xxxx'
> CWD inbound
< 250 CWD Command successful.
> TYPE I
< 200 Type set to I
> PWD
< 257 "/usr/nn/gateway/mbox/fxf/xxxx/inbound" is current directory.
> PASV
< 227 Entering Passive Mode (142,245,46,80,24,122)
> STOR abc.txt
< 150 Opening data connection for abc.txt.
> PASV
* FTP response reading failed
* Connection #0 to host proxy.xyz.com left intact
* Closing connection #0

When I tried to compare these logs with a windows based CoreFTP Client, they are identical still STOR command invocation. After which CoreFTP tries to establish a socket from proxy for data transfer. Every time it randomly picks up a port for data connection in range of 6200-6299.

Please see the snippet below for CoreFTP logs -

227 Entering Passive Mode (142,245,8,80,24,104)
STOR abc.txt
Resolving 142.245.8.80, via proxy (usproxy10.globeop.com)...
Connect socket #1192 to 172.19.111.118, port 80 (to 6248)...

150 Opening data connection for abc.txt.
226 Transfer complete.
Abc.txt - 358 bytes transferred

I am assuming this data connection through HTTP proxy is either not mentioned correctly as my initial curl command or it is not implemented in CURL. Can you please advise which is the case? Also, would greatly appreciate if you can help me to resolve this issue.

Many thanks for your help!

Regards,
Amit Umbarkar
This email with all information contained herein or attached hereto may contain confidential and/or privileged information intended for the addressee(s) only. If you have received this email in error, please contact the sender and immediately delete this email in its entirety and any attachments thereto.

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ: http://curl.haxx.se/docs/faq.html
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2015-06-09