Why does a user have to log out and back in again before they appear in (or dissapear from) a Unix/POSIX group they've just been added to (or removed from)? How hard would it be to calculate the the list of groups the user is in on the fly, or have a command that refreshed the user's list of groups?<p>I can understand why it didn't work this way when Unix/POSIX groups were designed and first implemented back in The Ancient Times -- when CPU, memory and disk were at a premium. But times have changed.... Is there a technical/architectural/security reason why this hasn't changed?
Because each process belongs to a set of groups (set via setgroups(2)), and that set of groups isn't necessarily the same as the set of groups to which the process' <i>user</i> belongs.