Re: FTP/S help
Date: Thu, 20 Mar 2008 13:56:49 -0700
On Thu, Mar 20, 2008 at 04:38:52PM -0400, Heiden, John wrote:
> Recently I was asked to create something to grab files from a company's
> server with sensitive data in it and the company only supports FTP/S for
What is FTP/S? Are you talking about FTPS? I'll assume you are.
> this. This lead me to cURL. After building it I did some testing and
> was able to transfer files with FTP, SFTP, SCP and so forth. So far I
> have had no luck in making a successful connection to grab this file
> via FTP/S, though. At first testing he was telling me I need to make an
> explicit TLS type of connection. After finding what I thought I needed
> to do that, now cURL crashes with a core dump. Unfortunately, I have
> no idea if I am supplying the right switches to accomplish what I need.
> Is there anyone out there that has a bit of experience with cURL for
> doing FTP/S type of transfers?
> curl --version
> curl 7.18.0 (powerpc-ibm-aix188.8.131.52) libcurl/7.18.0 GnuTLS/1.3.4
> zlib/1.2.3 libidn/1.5 libssh2/0.18
> Protocols: tftp ftp telnet dict http file https ftps scp sftp
> Features: IDN IPv6 Largefile SSL libz
That shows ftps support, so you're good there.
> I have tried the following:
> curl -v -S --tlsv1 --ftp-ssl --ftp-ssl-reqd -u username:password
> --list-only --no-sessionid ftp://server-ip-address:1586/filename.txt
--list-only is only for directories; I'm not sure what it will do when you
use it on a file. Otherwise, the command looks fine.
> I'm not sure if I need no-sessionid or not, but I thought it couldn't
You're right, it shouldn't. But maybe it does--have you tried without?
> I get the following back in messages:
> * About to connect() to IP-address port 1586 (#0)
> * Trying IP-address... connected
> * Connected to IP-address (IP-address) port 1586 (#0)
> < 220-FileZilla Server version 0.9.19 beta
> < 220 Welcome to Pearce & Pearce S-FTP
> > AUTH SSL
> < 234 Using authentication type SSL
> Segmentation fault(coredump)
That's a serious problem. You should never, ever get a segfault no
matter what options you use or what the remove server sends. Can you run
this under a debugger and find out where it's dumping core? Noone is
running an AIX autobuild with SSL support, so it's possible there is a
latent issue on that platform. Have you tried running the curl test
suite? There are a number of test cases there that should show a problem
if it exists on your platform.
> And their logs from this connection show:
> (000010) 3/20/2008 16:12:24 PM - (not logged in) (my-IP)> Connected,
> sending welcome message...
> (000010) 3/20/2008 16:12:24 PM - (not logged in) (my-IP)> 220-FileZilla
> Server version 0.9.19 beta
> (000010) 3/20/2008 16:12:24 PM - (not logged in) (my-IP)> 220 Welcome to
> Pearce & Pearce S-FTP
> (000010) 3/20/2008 16:12:24 PM - (not logged in) (my-IP)> AUTH SSL
> (000010) 3/20/2008 16:12:24 PM - (not logged in) (my-IP)> 234 Using
> authentication type SSL
> (000010) 3/20/2008 16:12:24 PM - (not logged in) (my-IP)> disconnected.
That matches well the log above.
-- http://www.MoveAnnouncer.com The web change of address service Let webmasters know that your web site has movedReceived on 2008-03-20