Is it me or is it sudo?

James Wilkinson fedora at aprilcottage.co.uk
Wed Mar 28 19:53:52 UTC 2012


Reindl Harald wrote:
> one of the odd defaults many are not using
> 
> why should i have a group with the name of my user
> if it has only one user - or why should i put the
> user "caroline" in group "harry" except for chaos
> 
> no idea who invented this silly default, however, do not
> assume all people are using defaults all the time

For what it’s worth, the Red Hat Linux 7.3 manual at
ftp://archive.download.redhat.com/pub/redhat/linux/7.3/en/doc/RH-DOCS/pdf-en/rhl-rg-en.pdf
section 6.4.1 gives the official rationale. It’s definitely a Red
Hat-ism, but there is some thought behind it.

Briefly, it’s because if you have a group shared directory (where users
in that group can edit all the files in the directory), you want the
default umask to be 002, which makes new files get rw-rw-r-- permissions
by default, and new subdirectories get rwxrwxr-x. (If the directory has
the group SUID bit set, then by default everything created in that
directory will inherit the same group).

But that means that files in your home directory also get rw-rw-r--
permissions, which is Not a Good Thing if anyone else is in the same
group. So you need a per-user group to keep home directories safe.

James.

-- 
E-mail:     james@ | "Yes, it's one those irregular verbs: I have an
aprilcottage.co.uk | individual mind, you are eccentric, he is completely
                   | round the twist."


More information about the users mailing list