S
S
Sergey Sokolov2016-04-16 13:05:08
linux
Sergey Sokolov, 2016-04-16 13:05:08

How to set the required uid / gid for NFS mounts?

There are two servers. How to mount a folder from one to another so that the files and folders on the client have the necessary local owners (user / group)?
On the server, serverUid / serverGid owns the files. On the client, the files must be owned by clientUid / clientGid.
The client will create new folders / files, and it is necessary that on the client they be under the client uid / gid, and on the server they turn out to be under the server ones.
As a compromise, I can create a user on the server with the required uid / gid, which matches the client ones.
Tell me how to be - zero experience with NFS.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
S
Saboteur, 2016-04-16
@sergiks

There are two options - either create a user with matching UIDs, or create a group, add users with matching UIDs to it.

P
Pavel Selivanov, 2016-04-16
@selivanov_pavel

NFS has an idmapd daemon that maps local and remote uid/guid. I advise you to see how it is configured

K
ky0, 2016-04-17
@ky0

www.troubleshooters.com/linux/nfs.htm , section "User ID Mapping Options", see all_squash + anonuid/anongid.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question