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.

2 thoughts on “NFS Exports on MacOS”

  1. Thank you so much Scott! I’ve been banging my head against this issue for several hours. The “nfsvc_addsock:: nfsrv_check_exports_allow_address(myname) returned 13” line helped me to find this post and apply the solution. I’m happy to report that it works. A curious fact: on macOS 14.0 (23A344) Sonoma, Podman/QEMU’s file sharing over virtio-fs and 9p is waaaaaaay slower than sharing over NFS.

  2. Thanks, it seems increasingly difficult to glean answers such as this by searching the web. This did the trick!


Leave a Comment