How to Install ProFTPD on Mac OS X 10.5 Server

Apple's built in FTP server is rather limited, and can not be managed with Webmin. Although you could install the PureFTP server and GUI, I would much rather prefer something that works well with Webmin.

System Requirements

Preperation

Open a terminal (or SSH into the system). Using the "wget" command, download the latest ProFTPD source code from the ProFTPD website (http://www.proftpd.org). Extract the files and change to the source code directory as shown.

As of the writting of this help file, the latest version is 1.3.2 which is avialable from ftp://ftp.proftpd.org/distrib/source/proftpd-1.3.2.tar.gz.

wget ftp://ftp.proftpd.org/distrib/source/proftpd-1.3.2.tar.gz
tar
xfvz proftpd-1.3.2.tar.gz
cd proftpd-1.3.2

Compiling and Installing

Before compiling, we must configure the source code for our system. This is as easy as running the configure script that is included with the source code. The configure script lets you specify options on how you want to build your program. For example, where you want it to get installed. By default, ProFTPD will install into /usr/local. If you wish to change the install location, simply run the configure script with the "--prefix=/where/to/install" flag.

In the example below, I want to install all the ProFTPD files in it's own directory (/usr/local/proftpd). If you want to install ProFTPD into the default location (/usr/local), just omit the "--prefix=/usr/local/proftpd" when running the command below.

./configure --prefix=/usr/local/proftpd

Once the configure script is done, type in "make" to start building the ProFTPD binaries. It will take a few minutes to compile ProFTPD depending on the speed of your system. Once the compilation is complete, install the binaries (as root) by typing in "sudo make install".

make
sudo make install

ProFTPD will by default use PAM to get system account information. This first needs to be enabled in OS X, otherwise users will not be able to log in with ProFTPD. The built in OS X FTP server utilizes the "/private/etc/pam.d/ftpd" authentication module. While ProFTPD is looking for "/private/etc/pam.d/ftp". Using the terminal, we will make a copy of the OS X FTP PAM module for ProFTPD.

cp /private/etc/pam.d/ftpd /private/etc/pam.d/ftp

Setting up ProFTPD with Webmin

Open up Webmin and configure the ProFTPD Webmin module by first expanding "Un-used Modules", then click on "ProFTPD Server". Click on "Module Config" and select the "System Configuration" category from the drop down. Change only the items shown below, then click "Save"

  • Path to ProFTPD config file: /usr/local/proftpd/etc/proftpd.conf
  • Path to ProFTPD executable: /usr/local/proftpd/sbin/proftpd
  • Path to ProFTPD PID file:/usr/local/var/proftpd/proftpd.pid

Go to the "Webmin Configuration" section under the "Webmin" menu and click the button labeled "Refresh Modules" to have the "ProFTPD Server" module appear under the "Servers" menu.

Before we can start ProFTPD, we need to make some OS X specific adjustments. Go ahead and open up the "ProFTPD Server" module under the "Servers" section. Select the "Edit Config Files" option. Look for the line that has the comment "Set the user and group under which the server will run." and comment out the next two lines so it looks like this:

# Set the user and group under which the server will run.
#User nobody
#Group nogroup

Click the "Save" button to return to the main menu. By now you should have a functional FTP server. However, thier are a couple of "tweaks" I like to do to make things work a little better. Lets start by removing the login delay.

  1. Click on "Networking Options" in the ProFTPD module's main menu.
  2. Change the "Do reverse DNS lookups of client" option to "No".
  3. Change the "Lookup remote ident username" option to "No".
  4. Click "Save" to save and return to the main menu.

Lets allow the use of "CHMOD":

  1. In the main menu, under "Virtual Servers" click "Default server".
  2. Under "Per-directory and Per-command options" click "Commands SITE_CHMOD".
  3. Click "Access Control".
  4. Change the "Access Control Policy" option to "Allow all clients".
  5. Click "Save" to save. Then click "return to main menu".

Limit Users to Home Directory:

  1. Click on "Files and Directoriess" in the main menu.
  2. Change the "Limit users to directories" option to "Home Directory".
  3. Click "Save" to save and return to the main menu".

Before starting ProFTPD, please make sure to turn off and disable the OS X built in FTP server using server admin. To start the ProFTPD Server, click on the "Start Server" button on the main menu.

NOTE: Thier is a bug where the "apply changes" button will not restart ProFTPD. You must click on "Start Server" after you try to apply changes.

Now, go ahead and try accessing your server through FTP as a user.

Starting ProFTPD Automaticly on Boot

You probably want ProFTPD to start automaticly on boot instead of having to start it up manually each time. To setup an OS X startup item, just use Webmin.

  1. Open up Webmin, and go to the "Bootup and Shutdown" module under the "System" menu.
  2. Click on "Add a new bootup action script".
  3. Action Name: PROFTPD
  4. Script name: PROFTPD
  5. Bootup Commands: /usr/local/proftpd/sbin/proftpd
  6. Description: ProFTPD
  7. Provides: FTP
  8. Start Message: Starting ProFTPD
  9. Stop Message: Stopping ProFTPD
  10. Start at boot time?: Yes
  11. Click "Create"

Your Done!

It's safe to delete the source code directory and source code archive to keep your system nice and clean.

Pacy
Powered by Pacy