Permissions and authentication schemes
Sometimes, after mounts have been successfully established, there are problems in reading, writing, or creating remote files or directories. Such difficulties are usually due to permissions or authentication problems.
Permission and authentication problems can vary in cause depending on whether NIS is being used and secure mounts are specified.
The simplest case occurs when nonsecure mounts are specified and NIS is
not used. In this case, user IDs (UIDs) and group IDs (GIDs) are mapped solely
through the server /etc/passwd file and client /etc/group file.
In this scheme, for a user named B
to be identified both
on the client and on the server as B
, the user B
must have the same UID number in the /etc/passwd file.
The following is an example of how this might cause problems:
User B is uid 200 on client foo.
User B is uid 250 on server bar.
User G is uid 200 on server bar.
The /home/bar directory is mounted from server bar
onto
client foo
. If user B
is editing files
on the /home/bar remote file system on client foo
,
confusion results when he saves files.
The server bar
thinks the files belong to user
G
,
because G
is UID 200
on bar
.
If B
logs on directly to bar
by using the
rlogin command, he may not be able to access the files
he just created while working on the remotely mounted file system. G
,
however, is able to do so because the machines arbitrate permissions by UID,
not by name.
The only permanent solution to this is to reassign consistent UIDs on the
two machines. For example, give B
UID 200 on server bar
or
250 on client foo
. The files owned by B
would
then need to have the chown command run against them to
make them match the new ID on the appropriate machine.
Because of the problems with maintaining consistent UID and GID mappings on all machines in a network, NIS is often used to perform the appropriate mappings so that this type of problem is avoided.