[phpa] Re: SHM Permissions

  • From: Goetz Lohmann <goetz.lohmann@xxxxxx>
  • To: phpa@xxxxxxxxxxxxx
  • Date: Wed, 15 May 2002 04:08:32 +0200

Hi there !

first of all ... great work you hav done with php-accelerator !!!

so ... now to the bogo ... I got the nearly the same problem as Marco.
I installed Version 1.3 of PHPa and everything is fine on running 
default values.
But by changing

phpa.shm_perms = 644
phpa.shm_user="httpd"
phpa.shm_group="httpd"

I noticed that phpa_cache_admin could not even connectd to the shared 
memory.
The child process is running as httpd but the Apache is started as root.

phpa_cache_admin is telling me:

[root]>phpa_cache_admin -m
8388608:8374184:32768:32768:8337260:4156:0:1021427005:m
[root]>su httpd
[httpd]>phpa_cache_admin -m
Unable to acquire shm sems - Permission denied
Unable to access cache shared memory - Permission denied
No shm cache available with key 0x0c0deb00
[httpd]>ipcs -m
------ Shared Memory Segments --------
key        shmid owner perms bytes   nattch status
0x0c0deb00 12292 root  644   8388608 9
0x00000000 12294 httpd 600   92164   9      dest

what happend ?
The shared memmory isn't initialised as httpd but instead as root, 
setting the
correct permissions to 644. Seems that the phpa.shm_user and 
phpa.shm_group line
is ignored ...

how to fix this ?

In fact, the script could read the shared memory ... so why it tell me
that there is no such key available ? Isn't it enought for the stats
to read the shared mem ... maybe to flush I have to write, but to get
the status also ?

regards, Götz Lohmann

 > From: "Marco 'solariz' Goetze" <solariz2@xxxxxxxxxxxxx>
 > Date: Mon, 6 May 2002 17:29:09 +0200
 >
 >Hi Nick,
 > sure i've read the release notes allready and the new variables
 > ar set.
 >  phpa.shm_user="wwwrun"
 >  phpa.shm_group="nogroup"
 > But in my Apache log the error iv'e mailed one minute ago appears
 > in short ranges. For now i've switched back to the 1.2p4

------------------------------------------------------------------------
  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: