Can you still use AFP sharing?

macOS has supported a wide range of file sharing services over the years, including SMB, NFS, FTP, WebDAV, and its own proprietary Apple Filing Protocol, AFP. More recently, the most popular have been SMB and AFP, but Apple’s SMB has had something of a rollercoaster ride, and in many versions of macOS has had problems, sometimes to the point of being unusable. Although AFP hasn’t been free of troubles, it had long been preferred by many using networked storage and file servers.

These sharing protocols act as intermediaries between the local file systems on a Mac, and a server on the network. Let’s say that you want to share your Home folder from one Mac to another. You enable File Sharing on the Mac storing that Home folder, then use the Finder’s Connect to Server… menu command on the other Mac (the client), and enter the address of the Mac which is sharing its files. The Mac you’re working on, which has connected to the server, then communicates over the network to request the current folder listing, and to transfer files, using a network file sharing protocol, which in this case could be SMB or AFP. That protocol translates between the two file systems.

AFP is Apple’s own protocol which was originally developed for Classic macOS, and has been widely supported by networked devices including storage such as NAS. But its use has now been deprecated for six years, since OS X 10.9 Mavericks. The last release was of AFP 3.4 over seven years ago, and since the introduction of Apple’s new file system APFS, it hasn’t been supported for the sharing of APFS volumes, only for the older HFS+.

This can have slightly odd effects.

By default, recent versions of macOS disable AFP connections for file sharing with other Macs. This means that when you try to connect, only SMB will be used, giving full access to both HFS+ and APFS volumes on the Mac sharing its files.

In the Sharing pane of the Mac acting as server, select the File Sharing item in the list at the left, then click on the Options… button at the right. This gives you control over the protocols to be used, and you’ll see that, with sharing enabled, only SMB is now ticked. You can override that by ticking AFP instead. To do this reliably, first turn file sharing off altogether, click on the Options… button, and there tick just the AFP item.

filesharingopts1

When you now try to connect to that Mac, SMB won’t be used, but AFP will. Because AFP doesn’t work with APFS volumes, those don’t appear in the list of those available on the server. If you’ve got your Time Machine backup connected to the server, or another hard drive using HFS+, that should still appear, though.

You can also designate the sharing protocol to be used according to the folder to be shared. To do this, add the folder you wish to share to the list of Shared Folders in the Sharing pane. Then Control-click the name of the folder to bring up the contextual menu, and select the Advanced Options command. If the folder is on an APFS volume, it will be tied to sharing over SMB. If it’s on an HFS+ volume, then you can choose between SMB, AFP, or both (the default). Note this menu also allows you to make a shared folder a Time Machine backup destination – and that’s how you can back up to a disk connected to a networked Mac.

filesharingopts2

So Macs running Mojave and Catalina can still share files using the AFP protocol, but only from HFS+ volumes. For sharing purposes, this makes AFP pretty useless in High Sierra and later.

What about using AFP for Time Machine backups to network storage (NAS), though?

So long as Time Machine makes its backups to HFS+ rather than APFS, that should remain safe and reliable. This is because Time Machine can still work with the networked storage using AFP, as if it was an HFS+ volume, as well as SMB. Should Time Machine switch to APFS volumes for backups, it’s likely that will require SMB, and AFP will stop working.

When backing up to a dedicated network device such as a NAS, that system should now offer the choice of using either SMB or AFP. Choosing which isn’t easy, and depends on how well that device works with each. In Catalina, most users are finding that macOS SMB is much improved from previous versions, and you should consider and try that as your first choice. However, specific manufacturers may have better AFP support, in which case that may prove preferable.

Apple’s support page covering file sharing hasn’t been updated in the last three years, and there’s an older note about legacy support. Particularly amusing in the first is the recommendation that: “When troubleshooting an SMB connection issue, use Console in the Utilities folder. Console logs can help advanced users identify an issue. Some log files may appear only when logged in as an administrator.” I suspect that whoever wrote that hasn’t actually tried what they recommended there.