Networks in Action
Serving Files Using FTP in Mac OS X
File Transfer Protocol, or FTP for short, is an IP-based method of moving files from one computer to another. “IP-based” means that it uses the same underlying communication methods as the Internet, so if your computer can connect to the Net, it can use FTP to transfer files.
In the past, FTP relied on separate client and server programs. You’d set up an FTP server on the computer that had files to share, then use an FTP client program on the computer that wanted to access said files. Mac OS X integrates the FTP server into the operating system, making it easy to share your files without needing a separate server. I previously wrote an article about sharing files between Macs and PCs via FTP that used a server on the PC and a client on the Mac (Basic FTP File Sharing Between Macs and PCs from ATPM 7.11). This article switches places, as Mac OS X serves files to Windows via the built-in FTP server.
Step One: Hardware Hookup
My own network consists of a Mac Cube and a Windows 2000 laptop. The two computers share a DHCP router, which provides Internet access and enables the two computers to “talk” to each other over the network.
If I didn’t have a router or existing network, I’d connect the laptop to the Mac using a crossover cable. Crossover cables create a network for two (and only two) computers. Connect each end of the crossover cable to the computers’ Ethernet ports and you’re done with the hardware setup. Find a crossover cable in the network section of your favorite (in a pinch, your second favorite) computer store.
Two-Computer Crossover Connection
Step Two: Check Your IP Address
Open the System Preferences application and select Network from the View menu or toolbar. This displays your active network connection (you could have more than one). Select Built-in Ethernet from the Show pop-up menu and note your IP address (192.168.123.160, in my case). We’ll use it later to make the FTP client connection.
Checking your IP address in the network view.
If you don’t have an IP address in the Network window, change the Configure pop-up menu to Manually and enter an address like 192.168.1.1. You can use any group of four numbers from 0 to 255 separated by periods, but the 192.168 prefix is reserved for private networks. Then enter a subnet mask of 255.255.255.0.
Step Three: Start the Mac OS X FTP Server
In the System Preferences application, select Sharing from the View menu. Check the “Allow FTP access” checkbox and confirm that your IP address appears in the “IP address” field.
Your Mac now shares the files in your home folder. To examine this directory, select Finder from the Dock, open your startup disk, and open the Users folder. The folder named after your user name is your home folder. When you log into the FTP server using your user name and password, you’ll see the files in that folder.
Start the Mac OS X FTP server.
Contents of my home directory
Step Four: Check the Laptop’s IP Address
Configuring the Windows laptop (mine runs Windows 2000) is similar to the Mac. To check its IP address, click the Start Button > Settings > Networks option, then open “Local Area Connection.” Select Properties, then select the TCP/IP protocol and select Properties again. This displays your IP address.
If you obtain your IP address automatically (my router uses DHCP, which handles the address automatically), you don’t need to do anything. You can assign an address manually as described for the Mac, just make sure the IP address is different (192.168.1.2, for example). The subnet mask is the same, 255.255.255.0. Choose OK to close the Properties windows.
Step Five: Access Your Shared Files
Since the Mac is our FTP server, we’ll access the files from the Windows laptop. Open Internet Explorer (which includes an FTP client) and enter this in the Address field:
ftp://[user name]:[password]@[Mac IP address]
The user name is your full Mac login name, including any spaces. Follow it with a colon and your login password, then the @ sign and your Mac’s IP address. This logs in to the Mac’s FTP server and you’ll see the following window.
FTP via Internet Explorer
The list of folders and files matches your home directory, except that you also see files like “.Trash” and “.DS_Store,” which are invisible on the Mac. Ignore these files, or at least don’t delete them.
Transfer files to or from the Mac by dragging and dropping them in the Internet Explorer window. Once you have the FTP connection, moving files between computers is just like moving them around the same computer. When you’re finished, close the window to log out of the FTP server.
An integrated FTP server is another bonus from Mac OS X’s bag of tricks. FTP makes file transfer easy for users of mixed platforms, like Macs, Windows PCs, or any other Internet-friendly operating system. FTP doesn’t overcome the file format differences, but people who work with platform-neutral formats like text and images or have the appropriate file translators should find FTP a very convenient way to move files around.
Also in This Series
- Mac to Windows: Troubleshooting the “No Logon Servers Available” File Sharing Error · October 2004
- Using WEP Security on an AirPort Network · July 2004
- Whatever happened to…Threemacs.com? · September 2003
- Clandestine Wireless Networking and MacStumbler · July 2003
- Learning to Share With Others: Sharing Preferences Overview · April 2003
- Serving Files Using FTP in Mac OS X · December 2002
- Switching Between Networks in Mac OS X · November 2002
- The Audio/Video Quadras (660av, 840av) · September 2002
- Thoughts on Apple’s Xserve · July 2002
- Complete Archive