
You can do this on the Services tab of the Sharing pane in System Preferences, or from the command line with

To allow Passive FTP access through the firewall:
#Ftp server for mac how to#
That is what we are going to show you how to do in the following task. In Passive mode the server must have port 21 and all or some of the ports above 1023 open. In Active mode the FTP server must have port 21 open in its firewall configuration (if it is using a firewall). In Passive mode the client initiates both connections, so the firewall on the client side will typically allow it.
#Ftp server for mac software#
In Active mode the client machine must be able to accept the data connections that are initiated by the FTP server, and this will often be blocked by firewall software on the client side. (The server may tell the client to select from a smaller range.) In Passive mode the client, not the server, initiates the data connection to a random port number between 105 on the server. In Active mode the server (not the client) initiates the data connection back to the client from port 20 on the server machine. (Review "About ports and sockets," in Chapter 12, for more on port numbers. In both Active and Passive modes the client initiates the command connection to port 21 on the FTP server. FTP uses two connections (also called channels ) between the client and servera command connection and a data connection. Active mode may also be blocked if the client is using Network Address Translation ( NAT ) to obtain access to the network, and has a non-routable IP address. Many client machines will be unable to use Active mode connections to FTP servers because the firewall on the client machine or local network will block the data connection from the server back to the client. The FTP protocol has two modes: Active and Passive. Log of FTP connections and file transfers. If this file exists, it is displayed to users attempting to log in, and access is refused. Ĭontents of this file are displayed when a user logs in via FTP.

List of users whose use of FTP is restricted to their home directory. List of users who may not connect to the FTP server. See Chapter 11 for more on launchctl and launchd. You can deactivate the FTP server from the command line with sudo launchctl unload -w /System/ Library/LaunchDaemons/ftp.plist Table 14.1 lists various files used by ftpd, the FTP server.
