Noticed this problem when trying to start frozen-bubble as user. Worked for root, but didn't for user, even though User in GAMES Group. After extensive testing, found it was because max groups of 32 was violated. This is a cause of confusion because the system will report all the groups user in, even if over 32 groups. So, user can check if in Games Group and if is, still can't start game. Why, because frozen-bubble checks to see if the three folders are readable to user and if they aren't, perl thinks they are only in 'users' group. If the code is changed to just see if folder 'exists' instead of 'readable' then game works for user. Besides Perl, I have found this problem with Python also. Only one I have noticed so far is the 'portage' group. If past limit of groups, it just doesn't work for user (search & pretend). Know that going over 32 groups is a concern to some, but have found enough on the net, of admins,... wanting more than 32. I have even dropped the number of groups I am in, but the lack of proper error messages is what concerns me. There is no type of warning that anything over 32 groups is the problem. Maybe even just a Gentoo Doc on the use/overuse of groups would do. Have also found info that as of kernel 2.6.4 it has been changed to 64k for groups. Think there is an overuse of ngroups_max that mean different things, so maybe the kernel is still at 32? Got confused over that issue and lack of information. Still, not having a warning of some kind can cause problems. ************************************** http://kambing.vlsm.org/kernel-linux/v2.6/ChangeLog-2.6.4 <akpm@osdl.org> [PATCH] NGROUPS 2.6.2rc2 + fixups From: Tim Hockin <thockin@sun.com>, Neil Brown <neilb@cse.unsw.edu.au>, me New groups infrastructure. task->groups and task->ngroups are replaced by task->group_info. Group)info is a refcounted, dynamic struct with an array of pages. This allows for large numbers of groups. The current limit of 32 groups has been raised to 64k groups. It can be raised more by changing the NGROUPS_MAX constant in limits.h ************************************** Is above talking about number of groups available or max groups a user can be in? POSIX Information: bash-2.05b$ getconf _POSIX_NGROUPS_MAX 65536 bash-2.05b$ getconf NGROUPS_MAX 65536 This might be a warning, but very unclear. Python: (if user in more than 32): >>> import os,sys >>> os.getgroups() Traceback (most recent call last): File "<stdin>", line 1, in ? OSError: [Errno 22] Invalid argument Python: (if user in 32 or less): >>> import os,sys >>> os.getgroups() [5, 7, 10, 11, 12, 15, 16, 17, 18, 19, 21, 22, 27, 35, 60, 70, 80, 85, 100, 101, 102, 250, 407, 409, 411, 412] Perl: (if user in more than 32) bash-2.05b$ perl stattest2.pl This script is running as david who belongs to the following groups: users Perl: (if user in 32 or less): This script is running as david who belongs to the following groups: users scanner clamav speech slocate portage foldingathome cdrecording users usb cdrw postgres mysql games video ftp cdrom audio console cron man mail floppy wheel lp tty Not sure what can be done as far as a warnings. There should be at least more detailed Gentoo Docs describing groups usage, some problems that can occur if violate this. Reproducible: Always Steps to Reproduce: 1. Put user in more than 32 groups and try to run frozen-bubble. 2. It has to be a a script that checks if user in group or getsgroups. 3. Failure. But Error messages are invalid. No clear way to troubleshoot. 4. Clearing this up might clarify a lot of bugs. Expected Results: Some type of warning that user is in too many groups. Or Docs explaining usage of groups better to clarify problems that can occur.
the only place we could really add such a warning is to the group* functions that are part of shadow ... and even that wouldnt really work if someone edits /etc/group by hand ...
Eh? NOTABUG? Perhaps a time to close this.
doesnt really seem to be a way to "solve" this
*** Bug 297950 has been marked as a duplicate of this bug. ***