Replace the FTP server with ProFTPd

Nov 05, '01 07:28:13AM

Contributed by: Anonymous

Here is a step by step guide to installing the industrial-strength FTP server ProFTPd on Mac OS X. It assumes that you have the Developers Tools installed on your system and that you have an Internet connection. The installation will replace the existing OS X FTP server with ProFTPd.

If you'd like to get ProFTPd running on your OS X installation, read the rest of this article.

INSTRUCTIONS

  1. Get ProFTPd

    In a terminal window, type (without "%", which represents the prompt):
      %   curl -O ftp://ftp.proftpd.org/distrib/source/proftpd-1.2.4.tar.gz
    to get the source code. Then type
      %   tar xvfz proftpd-1.2.4.tar.gz
    to unpack the distribution.

  2. Compile the source and install
    %   cd proftpd-1.2.4
    % ./configure
    % make
    % sudo make install
  3. Setup ProFTPd

    On the Sharing panel turn "Allow FTP Access" off. We now edit the file /etc/inetd.conf to let your system know that you want to use FTPPro instead. Make a backup copy of the file /etc/inetd.conf in case you want to revert to the built-in ftp server. Once you've done that, edit the file:
      %   sudo pico /etc/inetd.conf
    Replace the line
      #ftp    stream  tcp     nowait  root    /usr/libexec/tcpd       ftpd -ll
    with the line
      #ftp    stream  tcp     nowait  root    /usr/libexec/tcpd        /usr/local/sbin/proftpd
    Control-O to write the file and Control-X to exit.

  4. Edit the configuration file to suit your needs

    The configuration file is stored in /usr/local/etc/proftpd.conf. ProFTPd is incredibly flexible; for details of available options, see the configuration page on the ProFTPd website. Below is my very simple configuration file: no anonymous login and each user is limited to her own home directory.
    # This is a sample ProFTPD configuration file

    ServerIdent on "FTP server ready"
    ServerName "ProFTPD"
    ServerType inetd
    DefaultServer on

    # Port 21 is the standard FTP port.
    Port 21
    # Umask 022 is a good standard umask to prevent new dirs and files
    # from being group and world writable.
    Umask 022

    # Set the user and group that the server normally runs at.
    User nobody
    Group nobody

    <Global>
    DefaultRoot ~
    DeleteAbortedStores on
    ExtendedLog [absolute path of the file you want activity be logged on]
    AllowOverwrite on
    AllowChmod off
    </Global>
    Note that the path for logging must be absolute, and does not require quotes or brackets.

  5. Turn "Allow FTP Access" on in the Sharing panel.
You should be ready to go. Enjoy!

Comments (41)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20011105072813797