Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have two servers, one of which has a volume from the other mounted as an NFS device. I have an application on the mounter that creates files that must then be manipulated by an application on the mountee.

I am running into ALL kinds of permissions problems. I have the same users and groups on both servers, but the ids don't match up.

When the app on the mounter creates a file on the NFS device, the file appears to be owned on the mountee by some long numbers string.

I can't run a chown command from the mounter machine, because the app does not run as root.

Can anyone help me?

share|improve this question

2 Answers 2

up vote 1 down vote accepted

You need some method to synchronize the user accounts / IDs between your systems.

It can be achieved manually by (carefully) creating accounts and then synchronizing the password databases (eg, /etc/passwd on Linux) but is far more commonly achieved through the use of a directory service, such as NIS or an LDAP. The directory is then referenced by all the systems requiring shared authentication information making it much more scalable than creating accounts on each system.

Depending on how many users you have to maintain, the former method or a derivative of it may be less work than setting up a directory. I've seen a few instances (and do so myself on some small deployments) where configuration management systems (like Puppet or Chef) are used to keep the local password databases in sync on each system - this has the advantage of keeping an authoritative source of credentials but avoids the overhead of maintaining a directory service.

share|improve this answer

Specify the UID/GID on the second system when you create the account. (Or centralize authentication.)

From man useradd:

-u, --uid UID The numerical value of the user's ID. This value must be unique, unless the -o option is used. The value must be non-negative. The default is to use the smallest ID value greater than 999 and greater than every other user. Values between 0 and 999 are typically reserved for system accounts.

useradd man page

From man groupadd:

-g, --gid GID The numerical value of the group's ID. This value must be unique, unless the -o option is used. The value must be non-negative. The default is to use the smallest ID value greater than 999 and greater than every other group. Values between 0 and 999 are typically reserved for system accounts.

groupadd man page

share|improve this answer

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.