Return-Path: Delivered-To: apmail-apr-dev-archive@www.apache.org Received: (qmail 53482 invoked from network); 4 Jan 2007 15:35:05 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 4 Jan 2007 15:35:05 -0000 Received: (qmail 75700 invoked by uid 500); 4 Jan 2007 15:35:10 -0000 Delivered-To: apmail-apr-dev-archive@apr.apache.org Received: (qmail 75667 invoked by uid 500); 4 Jan 2007 15:35:09 -0000 Mailing-List: contact dev-help@apr.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Id: Delivered-To: mailing list dev@apr.apache.org Delivered-To: moderator for dev@apr.apache.org Received: (qmail 43897 invoked by uid 99); 4 Jan 2007 14:33:04 -0000 X-ASF-Spam-Status: No, hits=2.6 required=10.0 tests=HTML_00_10,HTML_MESSAGE X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: local policy) To: APR Development List Subject: apr_shm permission denied MIME-Version: 1.0 X-Mailer: V-webmail 1.6.4 ( http://www.v-webmail.org/ ) Date: Thu, 04 Jan 2007 15:26:27 +0100 From: Matthieu Estrade Content-Type: multipart/alternative; boundary="=_520c9776c98eb75a74f1b5e34b88cfe5" Message-ID: X-yoursite-MailScanner-Information: Please contact the ISP for more information X-yoursite-MailScanner: Found to be clean X-MailScanner-Envelope-From: web@ambuscade.moresecurity.org X-Virus-Checked: Checked by ClamAV on apache.org --=_520c9776c98eb75a74f1b5e34b88cfe5 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit Hi,I'm searching to create some shm at apache startup, then in each child, attach this shm and use it.Actually, i just create the shm, then cast a struct on the data i get with base_get_addr.I do this at post_config hook of apache 2.0.xThe problem is this shm is created as root, (i was thinking the post_config hook was running with apache user :( but it seems not...) and when i want to attach my shm in child (run as apache user), i have a permission denied.It seems it's because it's using APR_USE_SHMEM_SHMGET first in the condition to create shm. So as shm is root, i can't attach it in child...Is there a way to have the shm created with a flag saying i can attach it in a non root process ?Or a child in apache i can use at startup to create my shm not as root ?Matthieu _________________________________________________________ This mail sent using V-webmail - http://www.v-webmail.org --=_520c9776c98eb75a74f1b5e34b88cfe5 Content-Type: text/html; charset="ISO-8859-1" Content-Transfer-Encoding: quoted-printable Hi,

I'm searching to create some shm at apache startup, then in = each child, attach this shm and use it.

Actually, i just create = the shm, then cast a struct on the data i get with base_get_addr.
I do= this at post_config hook of apache 2.0.x

The problem is this sh= m is created as root, (i was thinking the post_config hook was running with= apache user :( but it seems not...) and when i want to attach my shm in ch= ild (run as apache user), i have a permission denied.

It seems i= t's because it's using APR_USE_SHMEM_SHMGET first in the condition to creat= e shm. So as shm is root, i can't attach it in child...

Is there= a way to have the shm created with a flag saying i can attach it in a non = root process ?
Or a child in apache i can use at startup to create my = shm not as root ?

Matthieu --=_520c9776c98eb75a74f1b5e34b88cfe5--