Re: postmaster -D PGDATA and postmaster.pid

From: "Medi Montaseri" <montaseri(at)gmail(dot)com>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: postmaster -D PGDATA and postmaster.pid
Date: 2007-11-27 22:17:05
Message-ID: 8078a1730711271417l26d25382ha33a1ec4439bbf00@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

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(at)sss(dot)pgh(dot)pa(dot)us> wrote:

> "Medi Montaseri" <montaseri(at)gmail(dot)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
>

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Elvis Henríquez 2007-11-28 02:28:59 Re: Case studies
Previous Message Никоноров Григорий 2007-11-27 18:01:12 Re: [GENERAL] Error while compiling PostgreSQL with Java