Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm having a good deal of trouble getting curl or wget to download files from FTP servers through an FTP proxy. I have setup GUI FTP programs to work...

gFTP works with these settings:

enter image description here

I get output like below when just using curl/wget with the ftp_proxy variable set to the proxy hostname:

# curl -v
* About to connect() to proxy blah port 21 (#0)
*   Trying blah... connected
* Connected to blah (blah) port 21 (#0)
> GET HTTP/1.1
> User-Agent: curl/7.19.0 (x86_64-suse-linux-gnu) libcurl/7.19.0 OpenSSL/0.9.8h zlib/1.2.3 libidn/1.10
> Host:
> Pragma: no-cache
> Accept: */*
> Proxy-Connection: Keep-Alive
220-Enter an Internet ftp address at the Name prompt.
220 Type help for usage information.
500 Syntax error, command unrecognized.
500 Syntax error, command unrecognized.
500 Syntax error, command unrecognized.

Is there some way I can configure the shell environment and/or curl/wget with the same settings as gFTP for passing through an FTP proxy?

share|improve this question
up vote 1 down vote accepted

The problem here seems to be the type of proxy used.

The proxy you are using is an FTP proxy. Wget`and Curl both use HTTP proxies.

share|improve this answer
Both curl and wget support FTP proxies... wget: ... curl: – entropo Mar 30 '11 at 21:11
Ah no - they support proxies for FTP transfers using HTTP proxies - not FTP native proxies. The protocols are different. The "GET blah.blah HTTP/1.1" in your debug output is a dead giveaway - that's an HTTP proxy request that is being generated. – Majenko Mar 30 '11 at 21:15
Hmm, okay. Are there any command line tools which DO support native FTP proxying? – entropo Mar 30 '11 at 21:39
You may not need them - the way the FTP proxy works you may be able to slip the details into the URL... f t p:// without any proxy set might possibly work. It's worth a try anyway – Majenko Mar 30 '11 at 21:40
If that doesn't work, try missing out the ftp@ or maybe changing the first @ to %40 – Majenko Mar 30 '11 at 21:42

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .