NFS - operation not permitted

Discussion in 'Mac Programming' started by vishwa, Jun 20, 2007.

  1. macrumors newbie

    Jun 7, 2007
    I tried to mount an NFS on to my Mac Tiger OS X (10.4.9) by using "sudo mount -t nfs /path_to_NFS ./directory_in_my_home" and the resultant terminal response is "mount_nfs: /Users/vishwa: Operation not permitted"
    I have already tested this on a linux desktop and it works fine without any problems. Also tried changing target directories on my Mac, but ended up with the same result.
    Any ideas on this?

  2. macrumors newbie

    Jun 25, 2007
    We must be insecure together!

    So, I was having the same problem.

    It turns out the the Darwin default is to assume the nfs'ing will take place on an "insecure" port, i.e. >1024.

    The suggested solution is to add "insecure" to the export options.

    For instance, I have

    /usr3 192.168.4/24(rw,insecure)

    In the /etc/exports file.

    Good luck.
  3. macrumors newbie

    Jul 5, 2008

    Looking at the exports man page on my Linux box, you will always need this option to export NFS shares for OSX.

  4. macrumors newbie

    Oct 28, 2010
    NFS - operation not permitted, another solution

    This thread is quite old, but I recently experienced the same problem with OS X 10.4.11 while trying to mount a NFS share on my DNS-323.

    My solution was to mount with "-P" to force the use of a reserved port number, as described in mount_nfs(8) page. The command was

    $> sudo mount_nfs -P <host>:<remote shared dir> <local mount point>

    This solution probably addresses the secure/insecure port issue mentioned by hacksawSA, but I don't know enough to confirm that. It's also slightly less intrusive in that you don't have to modify /etc/exports.

  5. macrumors 68000


    Feb 11, 2010
    Direct from the man page:

    This command is expected to be executed by the mount(8) command. Direct use of mount_nfs to mount NFS file systems is strongly discouraged because there is little practical benefit of using it
    instead of mount(8).
  6. macrumors newbie

    Nov 27, 2011
    Which is cool, except that the mount(8) command does not have the -P switch.
    Since I need the -P switch, now what?

  7. macrumors 6502

    May 29, 2011
    Littleton, Colorado, USA
    Now you read the manual pages - pay attention to the resvport option.

Share This Page