How to enable the FTP server (ftpd) in Lion
Apple decided to remove the GUI for enabling and disabling FTP from Mac OS X Lion. Generally speaking, that's not a bad move, because most times SFTP is available anywhere FTP is, and SFTP is far superior in terms of security. No one should be using FTP over the Internet.
However, there are some cases when using FTP is perfectly fine. For instance, transferring large files over your own LAN. I do this all the time when transferring DVD rips from one machine to another. Others have mentioned that they have some devices which only support FTP so SFTP isn't an option.
Personally, I prefer FTP on my LAN because, since it is unencrypted, there's no extra processing time needed to encrypt and decrypt the transfer. I'm also willing to admit that there may not be much practical difference in most cases -- that is, I don't know that SFTP is much slower than FTP, but when you're talking about "8 GB at a time" transfers, every little bit matters.
Enabling FTP on Lion
The good news is that Apple did not remove the FTP server (/usr/libexec/ftpd) from Lion, they only removed the GUI to enable or disable it.
The even better news is that there are (at least) two GUI tools for re-enabling it:
- Lion Tweaks (which also lets you toggle other Lion settings)
- FTPD Enable App which is an AppleScript app to launch ftpd
For those of us who prefer the command line, there are even instructions on how to enable ftpd using launchd.
ftpd.zsh
I wrote a small shell script called ftpd.zsh which will let you turn ftpd on or off, or check its current status. Usage is very simple:
-
ftpd.zsh --on -
ftpd.zsh --off -
ftpd.zsh
#1 will turn it on, #2 will turn it off, #3 will show you whether it is currently on or off.
My script is based on Daniel Smith's launchd commands mentioned above. The script must be run as root, but if it isn't, it will automatically re-launch itself using 'sudo' rather than failing ungracefully. It is also smart enough not to try to turn it on when it is already on, or off when it is already off.
To use the script, download ftpd.zsh and then put it somewhere in your $PATH such as /usr/local/bin and make sure it is executable chmod 755 /path/to/ftpd.zsh. (If any part of that previous sentence didn't make sense to you, I recommend using one of the GUI programs listed above. Using the Terminal is one option, but it's not the only option.)
Once again I repeat: if you are trying to connect to another machine over the Internet in an otherwise unencrypted manner, use SFTP. The only time FTP should be used is when there is no chance of the password being 'sniffed' by a nefarious third party.
You can enable SFTP and SSH in Lion (and previous versions of OS X) by going to System Preferences » Sharing and making sure that "Remote Login" is enabled. When in doubt, use SFTP. But if you need FTP and are aware of the risks, now you have the option of enabling it when needed.
ftpd just one time
If you want to enable ftpd immediately without downloading or installing any scripts or apps, simply enter:
sudo launchctl load /System/Library/LaunchDaemons/ftp.plist
into Terminal.app. If you want to turn it off afterwards, enter the command
sudo launchctl unload /System/Library/LaunchDaemons/ftp.plist
All ftpd all the time
If you use any of the above solutions, ftpd will be disabled again when you reboot the computer. If you want to enable ftpd automatically after every reboot, you will need to edit /System/Library/LaunchDaemons/ftp.plist by looking for the lines
and changing them to
which will tell Lion to enable ftpd on reboot. Use the launchctl load command shown above to enable it without rebooting.
Note: I recommend that you do not edit ftp.plist unless you absolutely cannot avoid it. I am firmly against tinkering with anything in /System/ but at the end of the day, it's your computer, and if if your situation requires ftpd to be available at all times, editing the plist is the best way to make sure it is always on.
Share
Categories
Apple decided to remove the GUI for enabling and disabling FTP from Mac OS X Lion. Generally speaking, that's not a bad move, because...
Add a Comment
I wonder if Adobe has already contributed to hacked Godaddy websites by not supporting secure FTP connections?
http://forums.adobe.com/thread/889530
stop. using. ftp.
September 29 2011 at 2:44 PM Report abuse Permalink +1 rate up rate down ReplyI tested the relative speeds of various network copies (ftp, scp, smb, afp) over 10/100 networks several years ago. There was no appreciable difference then due to the presence of absence of encryption and there definitely isn't now since computers are about 10-20x faster than when I did my tests. I agree, use FTP when there is no other option... and conversely, if there IS another option, DON'T use it.
September 29 2011 at 1:50 PM Report abuse Permalink rate up rate down ReplyI like CrushFTP: http://www.crushftp.com/ SFTP, HTTPS, web admin, integrate with LDAP (OSX Server).
September 29 2011 at 11:53 AM Report abuse Permalink rate up rate down ReplyI needed to add -F to the load command to get it to work:
sudo launchctl load -F /System/Library/LaunchDaemons/ftp.plist
This forces "load" to ignore the disabled key.
/System/Library/LaunchDaemons/ftp.plist by looking for the lines
Disabled
and changing them to
Disabled
Did you mean "Enabled"?
Why in the world would you ever want to do this? This may be the worst idea ever. Remember, there is always a better way than FTP
September 29 2011 at 11:22 AM Report abuse Permalink rate up rate down ReplyI think you mean change 'Disabled' to 'Enabled' in ftp.plist.
September 29 2011 at 11:18 AM Report abuse Permalink rate up rate down Reply"Once again I repeat: if you are trying to connect to another machine over the Internet in an otherwise unencrypted manner, use SFTP. The only time FTP should be used is when there is no chance of the password being 'sniffed' by a nefarious third party."
So why go to all this trouble and take any chance at all? SFTP accomplishes all the same things FTP does plus the added benefit of security.
Furthermore, the article says:
"I prefer FTP on my LAN because, since it is unencrypted, there's no extra processing time needed to encrypt and decrypt the transfer. I'm also willing to admit that there may not be much practical difference in most cases -- that is, I don't know that SFTP is much slower than FTP, but when you're talking about "8 GB at a time" transfers, every little bit matters."
However, Lion on newer Macs makes use of AES-NI hardware-accelerated encryption, and the openssl library (which SSH/SFTP/SCP uses) on Lion uses AES-NI. Most Macs from the last 19 months or so include this feature. This acceleration is what makes FileVault 2 encryption practically unnoticeable.
reboot, you will need to edit /System/Library/LaunchDaemons/ftp.plist by looking for the lines
Disabled
and changing them to
Disabled
which will tell Lion to enable ftpd on reboot. Use the launchctl load command shown above to enable it without rebooting.
You meant...enabled?
Hot Apps on TUAW
Deals of the Day
more deals- Used Apple iPhone 3G 8GB for AT&T for $108 + $5 s&h
- Apple Mac Pro Xeon 6-Core 3.3GHz Desktop w/ 12GB RAM for $3,899 + $28 s&h
- Apple MacBook Pro Core i7 Quad 2.2GHz 15" SSD Laptop for $2,447 + $13 s&h
- Apple Earphones with Remote and Mic for $6 + $2 s&h
- PC Micro Store sale: Up to 50 off
- USB MP3 Player FM Transmitter with remote for $6 + free shipping
Software Updates
more updates- EFI Firmware Update brings Lion Internet Recovery to 2010-model Macs
- OS X Lion 10.7.3 released with Safari 5.1.3, Wi-Fi bug fix
- Aperture updated to 3.2.2, addresses Photo Stream issue
- Apple updates Keynote to address Lion issues
- Google Search app gets new look on iPad
- Apple releases Apple TV Software Update 4.4.3



14 Comments