too many groups added for user www

Howdy !

I get the following error when adding just one more domain…when I thought I purchased an unlimited version… :

[Thu Aug 21 16:26:11 2008] [alert] (22)Invalid argument: initgroups: unable to set groups for User www and Group 80
[Thu Aug 21 16:26:11 2008] [notice] Apache/2.2.8 (FreeBSD) mod_ssl/2.2.8 OpenSSL/0.9.8e DAV/2 PHP/5.2.6 with Suhosin-Patch mod_jk/1.2.26 configured – resuming normal operations
[Thu Aug 21 16:26:11 2008] [alert] Child 57496 returned a Fatal error… Apache is exiting!
[Thu Aug 21 16:26:11 2008] [alert] (22)Invalid argument: initgroups: unable to set groups for User www and Group 80
[Thu Aug 21 16:26:11 2008] [emerg] (2)No such file or directory: Couldn’t initialize cross-process lock in child (/var/run/accept.lock.57493) (5)

So I went into your forums : alas the last advice was saying :

Make sure you have rev. of lib/libc/gen/getgrent.c.

But with FreeBSD 7.0 I have libc 7 installed as .so

So I have no-where to turn : I AM STUCK !

Please advise me something quickly…

Thank you SO much

Yehuda Guzzi

There’s also a ticket about this. I’ll cross-post the answer just in case anyone else runs into this problem.


Yes, this is FreeBSD’s group limit kicking in. Our install script is supposed to set Virtualmin to not use secondary groups, but I guess it failed in this case for some reason…or did you install Virtualmin manually?

Anyway, to fix this:

Remove the Apache user (www) from all of the virtual server groups.

Configure Virtualmin to not use secondary groups. This is in Server Templates in the "Apache website" section, labeled "Add Apache user to Unix group for new servers?". Set it to "No".

Make sure /home/* permissions are 751 (because Apache no longer has elevated privileges needed to get to your users website data, if they are 750).

Configure Virtualmin to use 751 permissions for homes rather than 750. This is configured in the Webmin:System:Users and Groups module in the Module Configuration.

This is one of the issues discussed in the FreeBSD notes here (though it doesn’t go into detail about how to deal with it…I’ll add something to docs about this for folks installing manually…and if you used the install script and this stuff didn’t get set correctly, I’ll need to fix it there):,freebsd_installation_and_configuration/

Are there updated links for the documents and ticket referenced in this post? The existing ones do not work.