Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?

share|improve this question

migrated from serverfault.com Oct 2 '13 at 22:42

This question came from our site for professional system and network administrators.

2 Answers 2

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.

share|improve this answer
    
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. –  nod Oct 3 '13 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.

share|improve this answer
    
Thank you. Could you maybe provide a sample line illustrating how to add those flags. –  puk Oct 3 '13 at 20:37

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.