0

How can I specify which user a new file created on the NFS share is owned by?
I.e. I've mounted a share on a client, userA is creating a file but that file shows as being owned by userB (possibly due to owner id staying consistent). How can I specify on server that all new files end up owned by userC e.g.?

  • Who have you mounted the share as? – Raman Sailopal May 24 '18 at 15:07
  • 1
    @RamanSailopal an NFS share must be mounted by root. – roaima May 24 '18 at 15:13
1

NFS expects uids and gids to be consistent across all servers.

File ownerships are mapped by uid rather than by name, so if you have userA as 1000 on the client, when it creates a file on the server that file will be owned by uid 1000. The server or a different client may see uid 1000 as a different user name.

If you're using NFS you should homogenise your uid/gid relationships

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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