"J.O. Aho" <
us...@example.net> writes:
> On 02/11/2022 01.33, bad sector wrote:
>> there is a method that 'some' distros use consisting of creating a
>> unique group for every user. The result is that a line in /etc/group
>> might look like:
>> userMe:x:1000:
>> and ownership shown for some file/folder in a file manager might be
>> owner: userMe
>> group: userMe
>> I don't really understand what the advantage of this is but that is
>> not my point.
>
> It's about user privacy, if all users belongs to the same group, then
> all users could have access to each others files, while each user
> belonging to different groups makes that a relaxed group privilege
> will not give other users access to your files.
It’s more complicated than that. The thing that controls per-user
(default) privacy settings is the umask. For instance a umask of 077
makes new files be completely private to their owner regardless of how
groups are set up.
The point of per-user groups is to allow umask to be set to make the
shared groups work properly.
* If the umask is 022 or 077 then, when a user creates group files (for
instance, by creating a file in a group directory with the setgid bit)
they’ll lack group read/write permission. The user must chgrp all
shared files before they can be used by other members of the group. A
minor nuisance for the user, and a major nuisance for their
collaborators when they inevitably forget.
* If the umask is 002 or 007 then group files get suitable permissions
automatically. But in this configuration the user’s personal files
would also have group read/write. By giving every user a personal
group which contains only themselves, the group read/write permission
on these files becomes equivalen to owner read/write.
--
http://www.greenend.org.uk/rjk/