cURL / Mailing Lists / curl-users / Single Mail

curl-users

curl and ftp methods

From: <jeremiah_at_easywebsite.se>
Date: Thu, 24 Nov 2005 17:13:45 +0100

Hey there!

 

I am trying to use curl to download an ftp file, here is the output from my
attempt with the -v flag;

 

bash -x test_curl.sh

+ curl -v
ftp://user:pass@ftpsecure.ingrammicro.com/FUSION/SE/CLICK8/151178.zip

* About to connect() to ftpsecure.ingrammicro.com port 21

* Trying 63.101.150.69... connected

* Connected to ftpsecure.ingrammicro.com (63.101.150.69) port 21

< 220 tn3270-ftp Microsoft FTP Service (Version 4.0).

> USER XXXXXX

< 331 Password required for XXXXXX.

> PASS XXXXXX

< 230-Welcome to Ingram Micro Customer FTP site! IF YOU EXPERIENCE
DIFFICULTIES

< 230-UNZIPPING YOUR FILES, PLEASE UPGRADE YOUR ZIP UTILITY.

< 230-TO UPGRADE YOUR SHAREWARE ZIP UTILITY, PLEASE GO TO:
http://www.winzip.com

< 230-If you experience any difficulties in accessing or using this site,

< 230-please contact the Electronic Commerce Support Center at (800)
616-4665.

< 230-

< 230 User XXXXX logged in.

> PWD

< 257 "/" is current directory.

* Entry path is '/'

> CWD FUSION

< 250 CWD command successful.

> CWD SE

< 550 SE: Access is denied.

* Remembering we are in dir FUSION/SE/CLICK8/151178.zip

* Connection #0 to host ftpsecure.ingrammicro.com left intact

curl: (9) FTP: access denied

> QUIT

< 221

* Closing connection #0

 

As you can see from the above curl moves into the directory FUSION first,
then tries to move into SE, fails, then leaves. This is different from the
behaviour of wget which moves directly into the target directory thusly;

 

/usr/local/bin/wget
ftp://xxxxx:xxxxxx@ftpsecure.ingrammicro.com/FUSION/SE/CLICK8/151178.zip

--16:54:42--
ftp://xxxxx:*password*@ftpsecure.ingrammicro.com/FUSION/SE/CLICK8/151178.zip

           => `151178.zip'

Resolving ftpsecure.ingrammicro.com... done.

Connecting to ftpsecure.ingrammicro.com[63.101.150.69]:21... connected.

Logging in as xxxxx ... Logged in!

==> SYST ... done. ==> PWD ... done.

==> TYPE I ... done. ==> CWD /FUSION/SE/CLICK8 ... done.

==> PASV ... done. ==> RETR 151178.zip ... done.

 

    [ <=>
] 111,992 99.24K/s

 

16:54:45 (99.24 KB/s) - `151178.zip' saved [111992]

 

Is there some way I can get my preferred tool (curl) to work in the same
fashion as wget so that it downloads the file from the remote ftp site?

 

Thanks,

 

Jeremiah

--
jeremiah_at_easywebsite.se
 
Received on 2005-11-24