X

Managing FTP services in OS X Lion

Apple has removed the option to enable FTP services in OS X 10.7 "Lion," but despite this there are ways to establish FTP connections to OS X systems.

Topher Kessler MacFixIt Editor
Topher, an avid Mac user for the past 15 years, has been a contributing author to MacFixIt since the spring of 2008. One of his passions is troubleshooting Mac problems and making the best use of Macs and Apple hardware at home and in the workplace.
Topher Kessler
3 min read

Apple's sharing services in OS X have included the options for the Mac-native Apple Filing Protocol (AFP), the Windows-native Server Message Block (SMB), and the classic File Transfer Protocol (FTP). These three file-sharing protocols have been useful for compatibility not only with common Mac and Windows machines, but the FTP option has enabled practically any system to transfer files to a Mac. The lack of the ability to enable FTP in the system preferences may seem a bit limiting, but there are ways to get around this and get FTP service back up and running.

Sharing System Preference
The option to enable FTP access in the File Sharing system preferences is missing in OS X Lion.

Enabling legacy FTP
Apple's FTP server software is still in the system, but is just not configurable through the system preferences anymore. As a result, while you can enable the FTP service you will have to do so through the command line by starting up the launch agent responsible for the FTP server's configuration. To do this, open the Terminal and enter the following command:

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

To then stop the server or start it when the system is running, you can issue either of the following commands in the Terminal:

sudo launchctl stop com.apple.ftpd
sudo launchctl start com.apple.ftpd

To completely unload the FTP daemon instead of having it stopped but still loaded in the system launcher, run the following command:

sudo launchctl unload /System/Library/LaunchDaemons/ftp.plist

Alternatively use secure services
There are a couple of reasons why Apple disabled the options for enabling the FTP server in OS X, one of which is the security limitations of FTP. FTP and some of the other early remote management tools like Telnet were developed before the need to implement security features, and as a result many of the security options for these tools were tacked on rather crudely, leaving them still quite vulnerable to attacks. As an alternative to these open protocols, more-robust ones were designed as part of the secure shell (SSH) protocol and accompanying tools, with a solid foundation in encryption and other security measures that could better ensure more secure connections and credentials protection.

Sharing System Preferences
If you enable "Remote Login" then you can access your system using various SSH services, including the encrypted SFTP protocol.

In OS X the secure server options can be enabled by turning on "Remote Login" in the Sharing system preferences, which only needs to be enabled to work, but you can specify individual user access if you would like. Once enabled, you can use any FTP client that supports the "sftp" protocol (most FTP clients will support this) to establish a file-sharing connection. Do keep in mind that if you are connecting to your system through a router, then you may have to reconfigure your router to allow the SFTP port to work. Legacy FTP connections are done on TCP port 21 by default, but the default port for SSH connections is 22. As with SSH and SFTP support in FTP client applications, most routers should also have a configuration option for routing SSH traffic.



Questions? Comments? Have a fix? Post them below or e-mail us!
Be sure to check us out on Twitter and the CNET Mac forums.