I am stumped with a problem I raised over on superuser and I basically got around it by using NFS version 3. Now, although I no longer have the user 4294967294
problem, now the files I mount are all owned by a user other than that which I want (RaspberryPi's original pi
instead of the one I created, raspi1
). Both users have root access, so my question is how are ownerships assigned under NFS? Is there anyway to designate who owns a file or is it based on the mount location?
2 Answers
Apparently there is a map_static
option which you can use in /etc/exports
to specify mappings between client and server UIDs/GIDs, but that is deprecated. Turns out, the UID and GIDs must be identical on both machines. I find this a little silly, but can easily be achieved through a few commands such as usermod
and groupmod
.
-
Silly as it may seem to you, NFS was designed primarily as a complement to NIS. In an NIS domain, all users authenticate to the same directory, regardless of the client, and thus all have consistent UID's between systems.– nodCommented Oct 3, 2013 at 1:39
You can use:
anonuid=1234,anongid=1234
in your /etc/exports
, to define the user/group under which all files and folders will get written onto your NFS destination.
-
Thank you. Could you maybe provide a sample line illustrating how to add those flags.– pukCommented Oct 3, 2013 at 20:37