cURL / Mailing Lists / curl-users / Single Mail


Trouble with an active ftp server

From: Nick Harley <>
Date: Tue, 26 Sep 2006 16:42:22 -0500

I'm trying to use curl 7.15.1 to put a file on an active ftps site. I
can't seem to get the ports worked out. They will only allow connections
over port 21. Here's the output of a typical run:

* About to connect() to ftpserver (ip address) port 21
* Trying IP address... connected
* Connected to ftpserver (ip address) port 21
< 220 xpeweb1 FTP server () ready.
< 234 SSLv23/TLSv1
* successfully set certificate verify locations:
* CAfile: /usr/local/share/curl/curl-ca-bundle.crt
  CApath: none
* SSLv2, Client hello (1):
SSLv3, TLS handshake, Server hello (2):
SSLv3, TLS handshake, CERT (11):
SSLv3, TLS handshake, Server finished (14):
SSLv3, TLS handshake, Client key exchange (16):
SSLv3, TLS change cipher, Client hello (1):
SSLv3, TLS handshake, Finished (20):
SSLv3, TLS change cipher, Client hello (1):
SSLv3, TLS handshake, Finished (20):
SSL connection using AES256-SHA
* Server certificate:
* SSL certificate verify result: error number 1 (19), continuing
> USER userID
< 331 Password required for UserID.
> PASS password
< 230 Virtual user userID logged in.
> PBSZ 0
< 200 PBSZ=0
< 200 PROT command successful
< 257 "/" is current directory.
* Entry path is '/'
* Telling server to connect to myIP_address:53189
> PORT myIP_address,207,197
< 200 PORT command successful.
* Connect data stream actively
< 200 Type set to I.
> STOR file
< 425 Can't build data connection: Connection timed out.
* Failed FTP upload: 425
* Uploaded unaligned file size (0 out of 3561 bytes)
  % Total % Received % Xferd Average Speed Time Time Time
                                 Dload Upload Total Spent Left
  0 0 0 0 0 0 0 0 --:--:-- 0:01:30
--:--:-- 0* Closing connection #0
* SSLv3, TLS alert, Client hello (1):

curl: (25) Failed FTP upload: 425

The people on the other end of this are saying that they won't send
data outside the normal ftp ports (20,21). Is there some way to force
this connection to negotiate 20 or 21 as the data connection channel? Am
I missing something here? Here's the config file I'm using for the

    --connect-timeout 60
    --ftp-port myIP_address #For navigating two firewalls
    --user userID:password
    --upload-file file
    --url ftpserver

Any help would be greatly appreciated.


This e-mail is intended for the sole use of the individual(s) to
whom it is addressed, and may contain information that is
privileged, confidential and exempt from disclosure under
applicable law. You are hereby notified that any dissemination,
duplication, or distribution of this transmission by someone other
than the intended addressee or its designated agent is strictly
prohibited. If you receive this e-mail in error, please notify me
immediately by replying to this e-mail.
Received on 2006-09-26