
96 Chapter 6. Users and Groups
Group GID Members
mailnull 47 mailnull
rpcusers 29
nfsnobody 65534
xfs 43 xfs
gdm 42 gdm
apache 48 apache
squid 23 squid
named 25 named
junkbust 73 junkbust
mysql 27 mysql
mailman 41 mailman
ldap 55 ldap
Table 6-2. Standard Groups
6.4. User Private Groups
Red Hat Linux uses a user private group (UPG) scheme, which makes UNIX groups easier to use.
The UPG scheme does not add or change anything in the standard UNIX way of handling groups;
it simply offers a new convention. Whenever you create a new user, by default, they have a unique
group. The scheme works as follows:
User Private Group
Every user has a primary group; the user is the only member of that group.
umask = 002
Traditionally, on UNIX systems the umask is 022, which prevents other users and other members
of a user’s primary group from modifying a user’s files. Since every user has their own private
group in the UPG scheme, this "group protection" is not needed. A umask of 002 will prevent
users from modifying other users’ private files. The umask is set in /etc/profile.
setgid bit on Directories
If you set the setgid bit on a directory (with chmod g+s directory ), files created in that direc-
tory will have their group set to the directory’s group.
Many IT organizations like to create a group for each major project and then assign people to the
group if they need to access that group’s files. Using this traditional scheme, managing files has been
difficult because when someone creates a file, it is associated with the primary group to which they
belong. When a single person works on multiple projects, it is difficult to associate the right files with
the right group. Using the UPG scheme, however, groups are automatically assigned to files created
within a directory with the setgid bit set, which makes managing group projects that share a common
directory very simple.
For example, say you have a big project called devel, with many people editing the devel files in a
devel directory. Make a group called devel, chgrp the devel directory to devel, and add all of
the devel users to the devel group.
Commenti su questo manuale