[CentOS] Two ftp clients? Why?

Mike A. Harris mharris at mharris.ca
Tue Aug 2 20:45:56 UTC 2011


On 02/08/2011 3:41 PM, James B. Byrne wrote:
> I had a problem wherein running a script with an embedded ftp call
> would work in the login shell during integration testing and then
> fail with an unrecognized option error in cron during acceptance
> testing.
>
> In solving this I discovered that RedHat, and therefore CentOS,
> ships with at least two ftp clients, /usr/bin/ftp ( which I thought
> I was using ) and /usr/kerberos/bin/ftp, which I actually was using.
>   even though I had no inkling of its existence.
 >
> My question is why?  Why are there two ftp clients provided in a
> single distribution and why is the kerberos version effectively made
> the default whereas one might reasonably assume that anything in
> /usr/bin/ is the standard ( and by inference default ) ftp client
> for the distribution?  If kerberos ftp is intended to be the default
> ftp client then why is it not in, or at least linked to from,
> /usr/bin?
>
> I just do not understand why these obscure distribution 'gotchas'
> are created in the first place, much less permitted to persist.

What I'm left wondering is:

1) Why you are relying on PATH expansion for this from something as 
critical as a cron job.  It is good sysadmin practice to specify 
explicit paths for situations like this rather than to worry about 
whether or not there is a good or valid reason for there being 2 ftp 
clients installed on the system.

2) Why you are using an ftp client rather than something like wget or 
curl instead, both of which are far more powerful and script friendly.


Presumably the kerberos client only gets installed if kerberos 
infrastructure is installed, and the standard ftp client is probably 
part of the default install as people expect it to be there perhaps. 
Putting in unnecessary logic to only install one ftp client and not the 
other doesn't make much sense either.

Focusing on finding the best way develop solid solutions to 
administrative scripting problems like this is IMHO much more important 
than trying to know or guess what the rationale is behind there being 2 
ftp binaries on the system.

Anyhow, if you have expectations of specific software being installed or 
not installed on your systems the only reliable and reproducible way to 
do that is to use kickstart with a minimal install and build up the 
package list to include only the things you want to have installed.

HTH



More information about the CentOS mailing list