[clug] NFSv4 "Invalid argument"

Scott Ferguson scott.ferguson.clug at gmail.com
Mon Oct 13 17:26:34 MDT 2014


On 14/10/14 09:40, Bob Edwards wrote:
> On 13/10/14 20:57, George at Clug wrote:
>> HI,
>> 
>> I am unable to understand how NFS works with user permissions.
>> Does anyone have experience with NFS shares in Debian Wheezy and
>> could explain to me how to manage user permissions for an NFS share
>> ? Maybe it is not even needed?
>> 
>> I searched the Internet but did not find anything useful

I forgot to add google-fu to my coffee yesterday, apologies.

https://www.google.com/search?q=nfs+v4+root

or:-
https://www.google.com/search?q=nfs+v4+user+permissions+debian
;)

The "nfs v4" (or, better "(nfs NEAR v4)") is a non-intuitive noise filter.

>> , I did find mentions of libnss-mysql and nfs4_disable_idmapping
>> but I could not find any detail on how this related to Debian.

https://www.google.com/search?q=nfs+v4+root+debian

There is no wiki.debian.org information - yet...
My usual first search includes "inurl:wiki.debian.org", my second search
includes "inurl:debian-user at lists.debian.org" e.g.:-
https://www.google.com/search?q=nfs+v4+root+inurl%3Adebian-user%40lists.debian.org
(but you won't find many answers to your question there)

Please add something to the debian wiki, if you have the time. Post to
debian-www at lists.debian.org if you have trouble getting a login as your
IP address has been blacklisted (it happens).

----------------8<--------------->8---------------------------
>> 
> 
> Hi George,
> 
> Would really need to see your /etc/exports file on the server (as 
> Scott pointed out).
> 
> Standard behaviour of NFS is to treat files owned by root on the 
> server as if they belonged to "nobody" when mounted over NFS. This 
> _can_ be over-ridden by exporting with "no-root-squash"

Yes. It's a feature of v4.
>From memory you'll also need anonuid=0,anongid=0 but I'm too lazy
(busy?) to read man export, and I 'suspect' remount (or bind) is a safer
option - providing you do have a compelling reason to do so. Off hand I
can't think of one (apropos of little).
Perhaps it's an x/y thing - i.e. booting from nfs v4 is possible without
mounting all nfs shares as root. From unreliable memory you'd need to
add something like:-
(no_root_squash,no_subtree_check) to /etc/exports.

> in the /etc/exports file, but you need to be really careful about
> what you are exporting in this case...
> 
> Why do you want to chown the files to root on the client anyway?

My thoughts also.

> 
> If you were to chown them on the server to some other user other than
> root (and the client and server both agree on uid to username mapping
> in some way), then they will appear as that user on the client. This
> may be closer to what you actually want.
> 
> Cheers,
> 
> Bob Edwards.
> 
------------8<---------------------->8-----------------------

HTH

Kind regards



More information about the linux mailing list