httpd-modules-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ben Noordhuis <>
Subject Re: mutex permission denied
Date Wed, 17 Aug 2011 14:39:01 GMT
On Wed, Aug 17, 2011 at 15:20, Jason Funk <> wrote:
> I am trying to implement an apr proc mutex in my module. When I created the
> mutex with APR_LOCK_DEFAULT the mutex is successfully created but I am
> getting "Permission Denied" when I try to acquire the lock. I ran
> "apr_proc_mutex_defname" to get the name of the default mutex type and it
> is APR_LOCK_SYSVSEM. Without changing anything else, I changed
> APR_LOCK_DEFAULT to APR_LOCK_POSIXSEM when creating the mutex, just to see
> what happens and everything works fine. Of course, this isn't portable. Any
> ideas why APR_LOCK_SYSVSEM doesn't work, but APR_LOCK_POSIXSEM does work?

I suspect that you see shmget() raising EACCES when you strace apache?
That's what happens when you create the mutex as root and try to
acquire it after httpd's dropped privileges, apr creates the semaphore
with mode 0600.

View raw message