[CentOS] Two ftp clients? Why?

John R Pierce pierce at hogranch.com
Wed Aug 3 04:02:04 UTC 2011


On 08/02/11 8:32 PM, Always Learning wrote:
> having grown-up on computers before M$ existed, I still find FTP very
> easy, quick and efficient.

the FTP protocol has 2 fundamental problems.   first, its a plaintext 
protocol that uses plaintext user/password authentication, and secondly, 
it creates dynamic sockets on the fly for file transfer, which makes 
tunneling it through firewalls problematic.   Further, there's two 
different methods of socket creation, each of which requires special 
case handling in firewalls at either the client or server side, and this 
method is chosen by the client, the server has no choice but to support 
what the client requests, these two modes are known as passive and active..


if you have to use ftp to transfer files, for instance with legacy 
embedded systems, and you're scripting this, check out lftp, its far 
more script friendly than the old legacy FTP client.

me, I use scp/sftp for authenticated remote file transfers over the 
internet, and mostly use NFS for internal lan transfers.   rsync is 
useful for incremental updates of a large set of files.   for anonymous 
file serving, I prefer to use http rather than FTP, its just as fast at 
the raw transfer, and its stateless, so there's less overhead on the server.


as an example of lftp, this is my cron job for updating my internal 
centos mirror

/usr/bin/lftp -c 'open ftp://mirrors.kernel.org/pub/ && lcd 
/export/mirror && \
        mirror -c -x ia64 -x s390 -x s390x -x alpha -x SRPMS centos'


(note, I'm not mirroring itanium, system/390, or alpha, nor the SRPMs.   
My local mirror is in /export/mirror/centos on that system, which is 
available via both NFS and http on my local network...).



-- 
john r pierce                            N 37, W 122
santa cruz ca                         mid-left coast




More information about the CentOS mailing list