Mounting a Linux NFS server on Mac OS X 10.6

It looks like in Snow Leopard (OS X 10.6), Apple broke some of the smartiness in NFS mounting from Finder. In 10.5, you could just slap nfs://host/path into Finder's "Connect to Server" dialog and it would happily mount just fine. In 10.6, it doesn't and here's what you get...

On the server, a mountd success message is the only indication that it received communication:

Oct  5 09:15:59 nfsserver mountd[5551]: authenticated mount request from 1.2.3.4:1015 for /nfsshare (/nfsshare)

On the client, the dialog box will briefly show the progress bar and then revert back to the "Connect to Server" input box. When mounting on the command-line, you'll get:

bash-3.2# mount_nfs nfsserver:/nfsshare /nfsmount
mount_nfs: /nfsmount: Operation not permitted

The disconnect is that Linux by default expects "secure" ports to be used for NFS. Mac OS X on the other hand defaults now to "insecure" ports. The secret sauce to get it to mount via mount_nfs is to specify the resvport mount option on the command-line or the better option of telling Linux to allow insecure ports for NFS communication in /etc/exports. Doing the latter will allow you to mount via the "Connect to Server" dialog or on the command-line.

If you just want to mount a Linux NFS mount (that by default does not allow "insecure" ports), use this on the Mac OS X command-line:

mount_nfs -o resvport nfsserver:/nfsshare /nfsmount

If you want to allow Mac OS X to mount Linux NFS mounts on the server, make sure your export line contains insecure. Here's an example line in /etc/exports:

/nfsshare          1.2.3.5(ro,async,no_root_squash,no_subtree_check,insecure)

Linux enforces an idealistic multi-user machine view of the old world. This concept of defining "insecure" and "secure" based on privileged port numbers is antiquated and doesn't apply in a world where everyone has ultimate privileges on their desktop machines.

posted by Matt | 10/05/10 | 10:15:49 am | 16215 views | Hastily filed in Gentoo, Mac OS X
PermalinkPermalink  

0101010101001010101110101010101011100101010101010100111000111010101011100001010101010101101101010111000110101011001011110101010100101000111010101001110101010101010111101010111011010101001001111011011010011011111010111101001011011101010001110010101010100011110101010101111010101100010010101

Trackback address for this post

Trackback URL (right click and copy shortcut/link location)

1 comment

Comment from: Guille [Visitor]
GuilleThank you very much. New to mac, comming from linux, and needing this!
10/08/11 @ 21:02

Leave a comment


Your email address will not be revealed on this site.
(Line breaks become <br />)
(For my next comment on this site)
(Allow users to contact me through a message form -- Your email will not be revealed!)

bottom corner