Unable to access NFS share from Mac OS X

9,699

I ran into this same issue myself when trying to mount a git repo directory from Ubuntu to OSX 10.10.3.

There were several things I did to make this work:

  1. I set up a new group in Ubuntu called shared, to which I added a new user with the same name as my OSX user. I also changed the group ownership of my git repository to shared. I used the uid and gid for these in the next step.
  2. Like you, I set up the NFS export and verified it using showmount. However, in addition to rw, I also included the following: (rw,sync,no_root_squash,no_subtree_check,insecure,anonuid=<<uid>>,anongid=<<gid>>). I read somewhere that insecure is especially important when dealing with macs (something about tcp port restrictions). Without that option, you're likely to get "operation not permitted" when mounting.
  3. Spelled the damn directory path correctly - this turned out to be the most obvious problem, but took me the longest to figure out. It seems that if the source directory in the NFS request does not exist, you get a "permission denied" instead of the more intuitive "directory does not exist".
Share:
9,699

Related videos on Youtube

Rónán Kennedy
Author by

Rónán Kennedy

Updated on September 18, 2022

Comments

  • Rónán Kennedy
    Rónán Kennedy over 1 year

    I am trying to use NFS to share an external drive mounted on an Ubuntu server with a Mac running OS X 10.9.5. I cannot access the mount point from the Mac.

    The relevant line in /etc/exports is:

    /mnt/goflex  (rw)
    

    The command I am running on the Mac is:

    sudo mount -t nfs TV:/goflex /private/goflex
    

    This is the error message I get:

    mount_nfs: can't mount /goflex from TV onto /private/goflex: Permission denied
    

    When I run showmount -e TV on the Mac, it does see the export.

    Can anyone suggest what I am doing wrong?