Why can’t I remove this top entry in the firewall options

firewall

I go into the System Preferences, Firewall, then Firewall Options. I can't select the "File Sharing (FTP)" entry to remove it. How can I?

enter image description here

Update: I'm running OS X 10.7.5, and nothing is enabled in the Sharing preference pane. At some point I must have turned on an FTP daemon for some testing, and forgot about it. I can do this:

$ ftp localhost
Trying 127.0.0.1...
Connected to localhost.
220 127.0.0.1 FTP server (tnftpd 20100324+GSSAPI) ready.

Turns out I could shut it off with:

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

I still feel like I should have been able to block it in the firewall preferences pane.

Best Answer

OS X automatically creates firewall entries when a service (like AFP or SSH) is started through System Preferences.

That's handy, because you don't have to bother with firewall rules. The OS configures the firewall as necessary for the selected services to work. The downside is that those entries can't be edited or removed from within the Firewall pane, you need to stop the service instead, which is somewhat counterintuitive.

Could it be that you have enabled FTP file sharing in System Preferences > Sharing?

If you are using Mac OS X Leopard or Snow Leopard you need to uncheck "Share files and folders using FTP", the firewall entry will then go away (credit: picture from eHow):

enter image description here

(Apple dropped FTP support on OS X Lion, though it can be enabled and disabled through the command line:

  • To enable and start the service:

    sudo launchctl load -w /System/Library/LaunchDaemons/ftp.plist
    
  • To disable and stop it:

    sudo launchctl unload /System/Library/LaunchDaemons/ftp.plist
    
  • To start/stop it when the system is running:

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

)