NFS Exports on MacOS

If you have tried to export a filesystem from your Mac to be used on another host, you might have had problems getting it to connect. The problem turns out to be simple, though the errors are… obtuse. For me, when I set up a share in /etc/exports, and tried to mount it from a linux host (that used to work), I would get an error in the Console app:

nfsvc_addsock:: nfsrv_check_exports_allow_address(myname) returned 13

This is… not helpful, and while it appears to be a DNS issue (isn’t it always a DNS issue?), it turns out it is the Mac trying to protect you from yourself, because you didn’t really want to export that filesystem, did you?

After trying a bunch of possible combinations of hostnames, disabling IPv6 on the linux host, and everything else I could think of, it occurred to me that it could be the system protection stuff that always prevents you from doing anything, and sure enough, I went to System Preferences–>Security & Privacy–>Privacy–>Full Disk Access and added /sbin/nfsd (to add it, hit Command-Shift-G, and type the full path) then from a command prompt “sudo nfsd restart” and now I can access the volumes from linux. I understand why they have the system protection, but it seems strange they don’t add their own daemons to the white list, or at the very least provide a meaningful error message when it is blocked.

Leave a Comment