[plug] NFS
Craig Ringer
craig at postnewspapers.com.au
Fri May 30 22:37:53 WST 2003
I know, reply-to-self == senile. Still, I do have some things I forgot.
*lol*.
> First, fix your non-sytem uids and gids so they're they're consistent
> over both machines. Personally I use LDAP to handle this automatically
> (its like NIS, but less ugly) but you don't need to ; just make the
> effort to keep track. You can edit /etc/passwd and /etc/group to change
> the IDs (CAREFULLY, use "vipw" and back up the files first). You'll need
> to "chown -R username.groupname /home/directory" for each altered user
> afterwards to get everything to behave.
Why to do this: because its much easier doing anything with two or more
UNIX systems if they share the same uids and gids. It avoids the need to
make ugly mapping databases, and generally makes life easier.
> Once you have sensibly in-sync uids and gids across the systems, I seem
> to remember you can chmod g+s the directory to cause all files in it to
> be written with the gid of the group that owns the directory. If your
> umask gives write permissions to group members by default, problem solved.
>
> I think. I've never needed this setup.
Yep.
$ mkdir test
# chgrp mail test
# chmod g+s test
$ touch test/new
$ ls -l test/new
-rw-rw-r-- 1 craig mail 0 May 30 22:33 test/new
Actually I'm pretty sure permissions are inherited too - including the
suid bit, meaning that new dirs will inherit the inheritance property
too :-)
$ mkdir test/subdir
$ ls -l test/subdir
drwxrwsr-x 2 craig mail 48 May 30 22:35 test/subdir
More information about the plug
mailing list