christophe barbe on Fri, 14 Feb 2003 11:10:34 -0500


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

[PLUG] OS X vs. Free Software: Take 2


Yesterday afternoon I got yes another Mac OS X server experience of
'Just it doesn't work' and though it would be a nice addition to 
the recent OS X thread.

I was asked to fix the ftp service on a Mac OS X server. On this server
the ftp service used to work as expected. But one day, the service
disappeared despite the claim of a running ftp service by the GUI.

I knew that ftp was serviced by /usr/libexec/ftpd from earlier top
screenshot.

First I tried to enable ftp in inetd.conf. After a kill -HUP the ftp was
working but ignoring the config entered in the GUI. Looking in backuped
filed I saw no difference in the inetd.conf file so the problem was not
there.

I then noticed that xinetd was present on the system but not running.
In the log I found that xinetd was not started because of a problem in
a config file in /etc/xinetd.d. I check the files and found that the ftp
file was full of garbage (I guess I will never know what happened to this
file). I replaced it by a backuped one and was surprised to see that the
binary was xftpd (instead of the expected ftpd). I told myself that it
was certainly a simple wrapper script to launch ftpd with the correct
option from the GUI. Not at all! This was an executable file. So let's
go to the man page. Oops no man page. 

As a side note, I wonder why both inetd and xinetd are running. IMHO it
doesn't make sens.

At this point I should precise that the ftp service was still not
running correctly. I add found and fix a problem but that was not enough. I add a
binary called xftpd that has no manpage and I was sure that when working
the binary name was ftpd. At this point each connexion tries were
rejected for an obscure reason (at least to me) 
   'ACCESS DENIED (not in any class)'
The good thing was that the xftpd when running renamed it itself 'ftpd'.
So I was not so far. I don't know why they did that. Is it just to
be more confusing (obfuscated?). Not that this message 'not in any class'
is not in the original ftpd as reveled by the magic command 'strings'.

So where are stored the config generated by the GUI? Not in /etc. As
reveled by 'strings' and that will not surprised people playing with OS X
server daily, in /Library/FTPServer/Configuration. 
This is something important to understand the system: You can find
anything in two places: The Free Software place (/var/log, /etc/, ...)
and the Apple place (/Library/Logs, /Library/*/Configuration, ...).
Also another trick (hack?) used by Apple is to have a config file
splitted in two (the normal one and the one generated by the GUI). If
you don't look closely enough it can be very confusing when your changes
are overrided by the Apple file.
In my opinion, that sucks.

Anyway the ftpaccess file was also in bad shape. Replacing it with a
backuped one fixed the problem. 

The problem was apparently caused by a crash/bug during a reboot (as
revealed by the logs) and was not fixeable using only the GUI (The GUI
keeps claiming that everything was fine). For me this is not a system
that simply works.

Christophe
-- 
Christophe Barbé <christophe.barbe@ufies.org>
GnuPG FingerPrint: E0F6 FADF 2A5C F072 6AF8  F67A 8F45 2F1E D72C B41E

Things should be made as simple as possible, but not any simpler.
-- Albert Einstein
_________________________________________________________________________
Philadelphia Linux Users Group        --       http://www.phillylinux.org
Announcements - http://lists.netisland.net/mailman/listinfo/plug-announce
General Discussion  --   http://lists.netisland.net/mailman/listinfo/plug