[phpa] Re: Permission Denied?

  • From: "Nick Lindridge" <nick@xxxxxxxxxxxxxxxxxxxxx>
  • To: <jcardoso@xxxxxxxxxxxxxxxx>
  • Date: Tue, 23 Apr 2002 15:06:13 -0000 ()

> On Tue, 23 Apr 2002, Nick Lindridge wrote:
>
>> > Hi all!
>> >
>> > I hoping that someone can shed some light on the following error I'm
>> > getting on a regular basis:
>> >
>> > [warn] shm - Unable to get shm sems - Permission denied (pid #####)
>> >
>> > I'm running phpa 1.2p4 on a FreeBSD 4.5 system with Apache 1.3.24
>> > and PHP 4.1.2.
>>
>> It's very likely to be this. Change the phpa.shm_perms to 666.
>
> I was considering this but wasn't sure what the security implications,
> if any, would be.

Well it'll mean that any user can access the shm cache. A compromise is to
use different apache users, but put all users in the same group. Then the
664 or 660 permissions will give access to the cache from all apache server
processes but not processes outside of the server group. You probably then
want to make sure that your file masks don't give group write access,
otherwise you've defeated part or all of what you're presumably trying to
accomplish by using different user id's for the server processes.

Another alternative would be to use different shm keys for the different
server processes. That will use more shm, but keep the caches entirely
separate. That isn't something that I've tested, but should work and you
might want to give that a go.

nick



------------------------------------------------------------------------
  www.php-accelerator.co.uk           Home of the free PHP Accelerator

To post, send email to phpa@xxxxxxxxxxxxx
To unsubscribe, email phpa-request@xxxxxxxxxxxxx with subject unsubscribe


Other related posts: