How Many Unix Groups Can A User Be A Member Of?

The specific answer seems to be:

  • up to 32 on a modern linux
  • except if you are accessing a file over nfs, in which case it is 16

...which explains our problem, we've recently crossed the 16-group boundary for some users.


For Linux Kernel 2.6.3 and above the limit is 64k groups per user.

If you are using NFSv4 the limit is higher than 16, too. (not sure about exact numbers here)


Look for NGROUPS_MAX in limits.h to find the value on your system.

I think this is a tunable parameter in a modern Linux kernel. (Used to be 16 on Solaris, I don't know if they have fixed that yet.)

Tags:

Linux

Unix