How to specify owner and permissions for an NFS mount

fstabgroupmountnfspermissions

I have an NFS mount in fstab:

10.0.12.10:/share1    /net/share1    nfs    rw    0    0

which defaults to root as owner and group and 777 permissions. How do I specify another owner and different permissions? I can use chown and chmod, but it certainly should be possible straight from the mount command?

The system OS is Ubuntu Server 14.04.

Best Answer

It isn't possible from the mount command, because mount has to handle a variety of different filesystem types - including ones that might not support 'classic' ugo unix style permissions.

You are "stuck with" chown/chgrp/chmod. (Where applicable).

Bear in mind the server has permissions on its own filesystem. It may well be doing some manner of mapping - more commonly you'll see root -> nobody, but NFSv4 and idmap opens a whole new can of worms there. (It doesn't apply direct uid/gid ownership, but rather maps userids against a common directory.)

Related Question