Mounting a Linux NFS share with Finder on Mac OS X 10.8.3

Mac OS X client

In Finder, go to:

Go → Connect to Server...

and, in the Server Address box, enter:

nfs://<server>/<export>

where <server> is the name or IP address of the NFS server,

and <export> is an export point listed in the NFS server's /etc/exports file (see below).

Linux NFS server

An anonymous export

On the CentOS box used for testing, there was was already in existence a user and a group with the name "nfsnobody" (with uid and gid of 65534). These will be the user and group owners of all files and directories created via NFS from the client.

As root, create a directory which will be used as the export point, such as /share

Set the ownership and permissions:

chown nfsnobody:nfsnobody /share

chmod 755 /share

In /etc/exports, add the line/share <client>(rw,all_squash,insecure,anonuid=65534,anongid=65534)

Replace /share in the example above with the actual directory you want to use.

<client> is the DNS name or IP address of the Mac OS X client. This is required because the rest of the parameters on the line allow unfettered access to the nominated directory, and we only want this for this one Mac OS X client, not for all machines which happen to be able to connect.

Restart/reload the NFS server (e.g., service nfs reload.)

Notes

  • The NFS server uses the source network port number from the client for security. Because the Mac OS X client uses a port number greater than 1023, the server requires the insecure keyword in the /etc/exports file
  • The all_squash, anonuid and anongid parameters force all NFS file and directory access in the export directory to effectively be from nfsnobody, regardless of the actual user on the Mac OS X client.