- Challenges of File Sharing
- Different Protocols for Different Clients
- Planning File Services
- Using Apple Filing Protocol
- Configuring Apple File Service
- Monitoring AFP Activity
- Using Windows File Service
- Configuring Windows File Service
- Configuring Access and Starting Windows File Services
- Using NFS Share Point Access
- Configuring NFS
- Using FTP File Service
- Configuring FTP Service
- Network-Mounted Share Points
- Preparing for a Network Home Folder
- Configuring Network Mounts
- Controlling Access to Shared Folders
- Troubleshooting File Services
- What Youve Learned
- Chapter Review
Using FTP File Service
FTP is a well-known cross-platform method for transferring files. Mac OS X Server supports FTP as a way to transfer files to and from your server. However, keep in mind that FTP is not known for its good security. Because of this, you should only use FTP when it is absolutely necessary. One such use might be to distribute your product documentation or drivers to everyone on the Internet. Such a situation would not fit well with other file-sharing mechanisms because you wouldn’t know what platforms they are using and wouldn’t want to create accounts for everyone.
You configure the FTP service in much the same way as you configure the AFP and SMB services—using Server Admin. The General pane of the Settings pane of Server Admin lets you control the number of users who can connect to the FTP service, the authentication protocol they use for connecting, and whether to let anonymous users connect. Anonymous FTP users are similar to guest-access users under AFP or SMB.
By default, all share points you create in Server Admin are shared via AFP and SMB, but FTP needs to be allowed. Once allowed by checking off FTP in the Protocol Options of the share point, simply turning on the FTP service gives access to these share points. The Advanced pane of the FTP service lets you modify this behavior. By enabling Home Directory with Share Points from the “Authorized users see” pop-up menu, you can force users to see only their home folders. FTP share points appear as a subfolder inside users’ home folders. This is a good way to prevent users from having access to other users’ home folders. The most restrictive option is “Home Directory Only.” This selection gives users access only to their own home folders. If you have FTP share points set up, anonymous users have access to those share points.
When providing access via FTP, passive FTP can be a useful option. Passive FTP is commonly used to access an FTP server behind a firewall. If your network administrator doesn’t allow any FTP access through your firewall, this option will not help you, but a common firewall configuration is to allow passive FTP but not active FTP. This is a client-side option. You do not need to configure anything on the server, but you may need to explain to your users that they must use passive FTP to connect to your server.
Understanding FTP File Conversions
One hidden, but useful, feature of the Mac OS X Server FTP service is its ability to perform automatic file conversions. The FTP server can automatically compress, archive, and encode files on the fly at the time they are requested. There are a few situations in which this comes in particularly handy:
- MacBinary: Some legacy applications use a special type of file called a forked file. This type of file can cause difficulties with FTP, so the server encodes the file in MacBinary format before sending it. To request this type of encoding, simply add the extension .bin to the file you are requesting. For example, if the FTP server has a copy of SimpleText, you can ask for SimpleText.bin, and the server will encode and send the SimpleText file in MacBinary format. MacBinary can be combined with both .tar and .gz compressions.
- Automatic archiving: If you need an entire folder of documents, just ask for the folder with .tar added at the end before the transfer. The server creates a single archive file of the folder, and you can expand it after you have downloaded it. Be aware that this feature doesn’t perform compression.
- Disk-image creation: When you include the .dmg extension in the URL, the FTP server converts the download into a disk-image file. This also works when downloading an application that has .app in the filename. In this case, the server automatically creates a .dmg file for the downloaded application.
- Automatic compression: If you are copying a large document, you can compress it by adding .gz to the end. This uses a UNIX-style gzip program. A useful shortcut is to chain archiving and compression. If you want a folder called bigfolder, you can ask for bigfolder.tar.gz, and the folder will be archived and compressed before it is sent.
Monitoring FTP Activity
The FTP server has a log that you configure in the Logging pane of the Settings pane. You can have the log keep track of uploads or downloads. You can view the activity in the FTP Log pane by clicking the Logging tab in the Server Admin toolbar.