FTP on Lion Server

By Richard Mallion

With Lion server Apple has relegated the FTP service to the command line. Its still there but now has to be enabled via the terminal.

Here are some simple instructions on how to enable the ftp service and enable ftp share points.

Enable FTP on the Server

The first thing to do is enable tnftpd, which is the FTP daemon.

To start up FTP we can use the launchd file ftp.plist which can be found in /System/Library/LaunchDaemons:

launchctl load -w /System/Library/LaunchDaemons/ftp.plist

To stop the FTP service use:

launchctl unload -w /System/Library/LaunchDaemons/ftp.plist

Enable FTP on Shares

By default share points in Lion have AFP and SMB enabled. The sharing command can be used to list and augment shares. To list enter:

sharing -l

Make note of the name for a share that you would like to enable FTP for, as well as whether AFP and SMB are enabled.
We can use the sharing command to enable each of these file sharing protocols. So think of these three services with the first one being AFP, the second FTP and the third SMB. We then use “1” to enable that specific service and “0” to disable.

Let’s use an example share of “Public”. Let’s also say AFP and SMB are enabled on “Public” by default. So the sharing command can be used to make a change (-e for edit) on the “Public” share, setting the services (-s) to 111 (AFP:on, FTP:on, SMB:on):

sharing -e Public -s 111

Or to enable just FTP (given that this example is a dedicated FTP server)(AFP:off, FTP:on, SMB:off):

sharing -e Public -s 010

Finally, make sure you ave the correct permissions set of the shares you are using.

1 Reply to "FTP on Lion Server"

  • Modesta

    Many thanks for finding the time to explain the terminlogy for the rookies!

Leave a Reply

Your email address will not be published. Required fields are marked *