[CentOS] Two ftp clients? Why?

James B. Byrne byrnejb at harte-lyne.ca
Tue Aug 2 21:32:56 UTC 2011


Mike A. Harris mharris at mharris.ca
Tue Aug 2 16:45:56 EDT 2011

> 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.

Point taken and that is e=indeed what i subsequently did.  However,
in my defence I explicitly set the PATH variable in the crontab
entry prior to invoking the calling script that uses ftp.  It never
crossed my mind that I should have first done a 'which ftp' to
discover which one was being used in my login shell because it never
crossed my mind that there would be two different ftp clients on my
systems to begin with.

And frankly, I do not think that anyone would a priori conceive of
there being two separate telnet clients, two different sftp clients,
or two of anything else of a similar nature as being a reasonable
possibility.



> 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.

I tried to use cURL for this particular bit, I in fact use cURL
everywhere else in the same script.  However, I am unable to
determine how to get cURL to give me a meaningful response to the
SYST command whereas the ftp client gives me a quite fulsome answer.

> 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.

Leaving it for an unsuspecting user to discover that there are two
dissimilar versions of the same utility is not user friendly.

> 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.

A rationale is more than I expect.  The excuse is likely that it is
just too difficult to bother with, as you pointed out above.

> 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.

I expected an ftp client to be installed and I found one in the
place I expected it to be.

What I did not expect was that there was a second one installed
somewhere else on a basic CentOS system with few local
customizations and that it was the other client that I was using in
my login shell.  I am sure that paranoia is a valued admin quality
but truly I do not expect to have to run which on every stock
utility present on a reputable distribution just to discover if
there is a second version of something installed somewhere obscure
and stuck into my path by the packager.

Nor do I expect that this issue or any like it will ever be
considered important enough to comment on by upstream, much less
looked at and reconciled.  Which essentially is why I dropped RH
support and went to CentOS in the first place.  But I am pissed that
this sort of BS still gets me from time to time.


-- 
***          E-Mail is NOT a SECURE channel          ***
James B. Byrne                mailto:ByrneJB at Harte-Lyne.ca
Harte & Lyne Limited          http://www.harte-lyne.ca
9 Brockley Drive              vox: +1 905 561 1241
Hamilton, Ontario             fax: +1 905 561 0757
Canada  L8E 3C3




More information about the CentOS mailing list