cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: List command hangs in passive mode

From: Edward Lau <edwardslau_at_gmail.com>
Date: Wed, 9 Apr 2008 10:04:18 -0700

Alright, maybe this is just my poor understanding of how curl works.
Then how would I fetch a file? Because I am getting the same behaviour
when I replace

-Q LIST

with

-Q "RETR file.txt"

Sorry for my lack of understanding. I am just trying to download a
file from a remote server to my local server. I didn't think I had
such a poor understanding of FTP. =/

Thanks,

Edward

> I don't even need to see the log--the answer is here:
>
>
> > % curl --user XXX:XXX --cacert cacert.pem --tlsv1 --disable-epsv --ftp-ssl-reqd
> > --show-error --verbose -Q "CWD outbound/BTBT" -Q "TYPE I" -Q PASV -Q LIST ftp:/
> > /ftpssl.rbc.com
>
> Trying to do things like PASV and LIST through quote commands just isn't
> going to work. They put the remote server into a state that's inconsistent
> with what curl thinks it is, since it just passes quote commands blindly to
> the remote side. curl already takes care of all those commands as part
> of a normal transfer.
>
> You probably want a command more like:
>
>
> curl --user XXX:XXX --cacert cacert.pem --tlsv1 --disable-epsv \
> --ftp-ssl-reqd --show-error --verbose \
> 'ftp://ftpssl.rbc.com/outbound/BTBT/'
>
> If you look at the verbose logs, you'll see curl doing the CWD, TYPE, PASV,
> and LIST commands on its own.
>
> >>> Dan
> --
> http://www.MoveAnnouncer.com The web change of address service
> Let webmasters know that your web site has moved
>
Received on 2008-04-09