Skip to content

Ask HN: Why do Unix groups still require re-logging in to register changes?

3 pointsglyphobet2 comments
On HN

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?

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?

Comments

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' user belongs.

Because no one has hacked together a good solution for it, presumably.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.