Page 1 of 1

How to download/upload files through a ftp proxy server with"curl"

Posted: Thu May 31, 2007 3:23 pm
by anish
This help is for linux machines behind a FTP proxy.. (Note: Squid is not a true FTP Proxy server)

Say the proxy server is squid configured to be running on ' 192.168.0.10' Port '3128'
then some of the things we can do..

* List Files On FTP Server

curl --proxy 192.168.0.10:3128 [url]ftp://xyz:mypass@sharethespace.com:21[/url]

* Download a file

curl -o STSServerInstaller.exe --proxy 192.168.0.10:3128 [url]ftp://xyz:mypass@sharethespace.com:21/STSServerInstaller.exe[/url]

* Upload multiple files to the ftp server..

curl --upload-file "{rarlinux-3.6.0.tar.gz,vmlogo.xpm}" --verbose --proxy 192.168.0.10:3128 [url]ftp://xyz:mypass@sharethespace.com:21[/url]

Note: We are uploading two files ie. rarlinux-3.6.0.tar.gz and vmlogo.xpm, similarly we can state more files, with a comma seperated list.

* We can also give the username/ password in options which is much safer than using it on the URL.

curl --upload-file "{rarlinux-3.6.0.tar.gz ,vmlogo.xpm}" --verbose --proxy 192.168.0.10:3128 -u xyz:mypass [url]ftp://sharethespace.com:21[/url]

curl -o STSServerInstaller.exe --proxy 192.168.0.10:3128 -u xyz:mypass [url]ftp://sharethespace.com:21/STSServerInstaller.exe[/url]

curl --proxy 192.168.0.10:3128 xyz:mypass [url]ftp://sharethespace.com:21/path/to/file[/url]


CURL is a free GPL'ed Utility available on various platforms. in linux it comes by default.. in case its not there, please visit http://curl.****.se/download.html and download the version required for your platform. Windows Binary download is here

Note: The normal FTP client (Shell or ftp on dos prompt) does not work with ftp proxy servers.

CURL is a free GPL'ed Utility available on various platforms. in linux it comes by default.. in case its not there, please visit http://curl.****.se/download.html and download the version required for your platform. Windows Binary download is here

Note: The normal FTP client (Shell or ftp on dos prompt) does not work with ftp proxy servers.

Posted: Fri Jun 01, 2007 7:11 pm
by SHAdmin
Thank you for sharing the usefull 'How To' with the community members. You have been credited 25 points for sharing it.