httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dan Poirier <poir...@pobox.com>
Subject Re: [users@httpd] initgroups() failure
Date Thu, 09 Oct 2008 22:42:52 GMT
[rearranged to fix top-posting]

On Wed, Oct 8, 2008 at 10:01 PM, Arvind Shenoy <mailto:ashenoy2985@gmail.com> wrote:
> I recently installed httpd-2.2.9 (with LDAP and SSL) on my Mac OS X 10.5.4
> box. Everything went very smoothly except for one thing; Apache keeps
> shutting down due to the following initgroups failures:
> [Wed Sep 24 19:02:11 2008] [alert] (2)No such file or directory: initgroups:
> unable to set groups for User <user> and Group <gid>
> and
> [Wed Oct 08 15:00:48 2008] [alert] (22)Invalid argument: initgroups: unable
> to set groups for User <user> and Group <gid>

On Thu, Oct 9, 2008 at 5:41 AM, Dan Poirier wrote:
> The man page for initgroups on Mac OS X says only: The initgroups()
> function returns -1 if it was not invoked by the superuser.  But
> looking at the code, there are other possible causes.
>
> Arvind, have you checked the console for any messages that Mac OS X
> might have logged at the time of the problem?  If directory services
> is having problems, it might log them there.
> (/Applications/Utilities/Console.app).

"Arvind Shenoy" <ashenoy2985@gmail.com> writes:
> Unfortunately, there are no related messages
> in Console.app. System.log also does not raise any red flags. I would
> really like to find out (but don't know exactly how to go about
> it) is whether the initgroups() call is failing because of not being
> called by the super-user or because of something else. 

The odd thing is, the call is inside "if (!geteuid())", so it won't
even get called unless running as root.

You say "keeps shutting down".  Do you mean it always crashes when
you try to run it?  Or that sometimes it works, for a while?

If it always crashes, I'd try running "id" with the user that
httpd is configured to run as.  E.g.

  id poirier

and make sure it shows that that user is a member of the group that
httpd is configured to run as.  I suggest confirming this by running
"id" because Mac OS X doesn't necessarily use /etc/passwd and /etc/group
to store that information, and maybe those files look right but Mac OS X
is confused.

If it crashes now and then, I wonder why it's even running that code
after startup.  If it's starting and stopping child processes regularly,
maybe you could tweak your MPM settings so it starts the servers it
needs at startup and just keeps them running.

Dan

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message