The kernel view
Conceptually, there are three sets of groups that a process is a member of. Each set is a subset of the following one.
- The single group that is the process's default group, which files created by this process will belong to.
- The set of groups that are checked when the group requires permission to open a file.
- The set of groups that a process running with extra privileges process can draw upon.
For historical reasons, these sets are respectively:
What is the case of "a process running with extra privileges process can draw upon" in point 3?
Is this case different from the case of "when the group requires permission to open a file" in point 2?
Do the "supplementary group IDs" include the primary group ID, in general and in point 2 respectively?
By "in general", I mean that I notice the output of
idincludes both primary and supplementary groups following
groups=, while https://unix.stackexchange.com/a/18203/674 says "each user can belong to a number of supplementary groups - and these are listed at the end of
idoutput." So I wonder if the primary group is also a supplementary group?