Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 053AA2E2F15 for ; Tue, 27 Nov 2007 18:17:18 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 79619-05 for ; Tue, 27 Nov 2007 18:17:10 -0400 (AST) Received: from mu-out-0910.google.com (mu-out-0910.google.com [209.85.134.189]) by postgresql.org (Postfix) with ESMTP id F02F22E026C for ; Tue, 27 Nov 2007 18:17:09 -0400 (AST) Received: by mu-out-0910.google.com with SMTP id i10so1739507mue for ; Tue, 27 Nov 2007 14:17:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; bh=IG2VH10Q0bFKgDmSPFn/syFP1wXj8/C+O89awcjTPAc=; b=tvNaH39fCx3vB6ea4wJ3P4pqcsmh+j8fwkGkQF+i8sQD+ZVsfIzecakcU3VyMas7LZPIj3hfPUMv1IfnEMrilmeNPmBCtb5aVbM6Wm5KXGJa2TgbUisxHtqiNkmTbGnpY2qL9ttcKhM+XBZHrwghDXW92qI4bLM6qC+/pSdjhUU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=yHP6BFYdTv1nCr/wyyw/N8GRH7/UGAH9k0q8qKrAzhq5PP6W0P71s1gSsQuaEvTpXYThu2cia3HAaLOlVkVaElZ9mPaotrFs9ojaOvxsPZ5ZlZhaKHbkmnPRJ/zCgvRY+CKdfJEbKpKNtKaFJd6Z60bXWonv2GxR81ycbRtNBa0= Received: by 10.65.225.7 with SMTP id c7mr31752180qbr.1196201825544; Tue, 27 Nov 2007 14:17:05 -0800 (PST) Received: by 10.64.242.15 with HTTP; Tue, 27 Nov 2007 14:17:05 -0800 (PST) Message-ID: <8078a1730711271417l26d25382ha33a1ec4439bbf00@mail.gmail.com> Date: Tue, 27 Nov 2007 14:17:05 -0800 From: "Medi Montaseri" To: "Tom Lane" Subject: Re: postmaster -D PGDATA and postmaster.pid Cc: pgsql-admin@postgresql.org In-Reply-To: <9909.1196135326@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_2201_9587922.1196201825542" References: <8078a1730711261934l22e62f68t26301d638ae73c96@mail.gmail.com> <9909.1196135326@sss.pgh.pa.us> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200711/235 X-Sequence-Number: 27478 ------=_Part_2201_9587922.1196201825542 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Thanks Tom..that did the magic.... Would I allow PG to start from any -D place by saying semange fcontext -a -t postgresql_db_t "/qmsvol(/.*)?" Thanks Medi On Nov 26, 2007 7:48 PM, Tom Lane wrote: > "Medi Montaseri" writes: > > However if I try to start the engine with "/etc/init.d/postgresql start > " or > > service postgresql start" I see the following error message in my PGLOG > (ie > > /var/log/pgsql/pgstartup.log) > > > postmaster cannot access the server configuration file > > "/qmsvol/pg_8.1.9/data/postgresql.conf": Permission denied > > This being CentOS (ie RHEL), you probably have got SELinux turned on > by default. The out-of-the-box SELinux policy forbids the postmaster > daemon from accessing portions of the filesystem other than > /var/lib/pgsql. > > You can either disable SELinux or fix its policy to allow PG to access > the area where you want to put PGDATA. I don't really recommend the > former, at least not for a system that has any exposure at all to the > open Internet. However, I don't have a recipe for fixing the latter > in my hip pocket, either. (Really need to go study SELinux someday.) > > regards, tom lane > ------=_Part_2201_9587922.1196201825542 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Thanks Tom..that did the magic....

Would I allow PG to start from any -D place by saying

semange fcontext -a -t postgresql_db_t "/qmsvol(/.*)?"

Thanks
Medi

On Nov 26, 2007 7:48 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
"Medi Montaseri" <montaseri@gmail.com> writes:
> However if I try to start the engine with "/etc/init.d/postgresql start " or
> service postgresql start" I see the following error message in my PGLOG (ie
> /var/log/pgsql/pgstartup.log)

> postmaster cannot access the server configuration file
> "/qmsvol/pg_8.1.9/data/postgresql.conf": Permission denied

This being CentOS (ie RHEL), you probably have got SELinux turned on
by default.  The out-of-the-box SELinux policy forbids the postmaster
daemon from accessing portions of the filesystem other than
/var/lib/pgsql.

You can either disable SELinux or fix its policy to allow PG to access
the area where you want to put PGDATA.  I don't really recommend the
former, at least not for a system that has any exposure at all to the
open Internet.  However, I don't have a recipe for fixing the latter
in my hip pocket, either.  (Really need to go study SELinux someday.)

                       regards, tom lane

------=_Part_2201_9587922.1196201825542--