cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: Bug in cURL?? (command line w/ "--local-port" option)...

From: Scott Fletcher <fletchsod_at_yahoo.com>
Date: Thu, 23 Nov 2006 07:59:29 -0800 (PST)

> > The port number for FTPS command port is 20021 and
> the port number for FTPS
> > data port is in the range of 20050 to 20750.
>
> Hold it right there.

The paper I got from the SunTrust bank said this...

--snip--
DNS: onlinefiletransfer.suntrust.com
REMOTE ID: ***
PSW: ***
PROTOCOL: FTPS(SSL/AUTH)
          PASSIVE MODE
          EXPLICIT
CONNECTION PORT : 20021
DATA CONTROL PORT RANGE: 20050-20750

cd /ARAUTOAC then put filename (for transferring over)
--snip--

> 20021 is the remote port number. You use passive FTP
> so the server is
> responsible for setting up the second port to
> connecto to, so thus curl cannot
> dictate anything about what remote port number it
> will use.
>
> --local-port sets the *local* port number of a
> connection (as connections have
> port numbers in both ends).

Okay, so it meant I can't use the --local-port option
since the cURL and the FTPS server work it out for
themselves.

> What exactly does that port number requirement for
> the "data port" mean?

See the snipplet I had enclosed above from SunTrust.

> > The response I got is that port 20050 can't be
> used and it start using port
> > 20051 and then it stopped working with no
> responses.
>
> At what point did it stop?

Where the "CWD ARAUTOAU" was executed, where the
"PASV" was executed and somewhere along the line of
this after the "-T 'file_testcase.txt'"... was
executed.

--snip--
 Trying 194.54.96.133... Bind to local port 20050
failed, trying next
 Local port: 20051
--snip--
 Don't remember the IP-Address that was returned.

Here's what I remember when I tried it without the
"--local-port" option is where the "CWD
ARAUTOAU"/"PASV" was executed and then it paused. It
had never recovered from the pause.

Something I should know about? Also, is this command
line correct (if we leave out the "--local-port"
command's option).

--snip--
curl -v -T "file_testcase.txt" --disable-epsv
--disable-eprt --ftp-pasv --ftp-ssl --local-port
"20050-20750" -u "***:***"
"ftp://onlinefiletransfer.suntrust.com:20021" --quote
"CWD /ARAUTOAU"
--snip--

Thanks...
Received on 2006-11-23