Re: PG84 and SELinux - Mailing list pgsql-general

From Tom Lane
Subject Re: PG84 and SELinux
Date
Msg-id 22175.1291240461@sss.pgh.pa.us
Whole thread Raw
In response to PG84 and SELinux  ("James B. Byrne" <byrnejb@harte-lyne.ca>)
Responses Re: PG84 and SELinux  ("James B. Byrne" <byrnejb@harte-lyne.ca>)
Re: PG84 and SELinux  ("James B. Byrne" <byrnejb@harte-lyne.ca>)
Re: PG84 and SELinux  (Devrim GÜNDÜZ <devrim@gunduz.org>)
Re: PG84 and SELinux  ("James B. Byrne" <byrnejb@harte-lyne.ca>)
List pgsql-general
"James B. Byrne" <byrnejb@harte-lyne.ca> writes:
> Earlier today I attempted to upgrade a production server from 8.1 to
> 8.4 using the pgdg-84-centos.repo.  I say attempted because I could
> never get it to support ssl connections and as that is a requirement
> I had to roll back to 8.1.

Can't comment on that without a lot more detail.

> Whatever was the cause of the ssl problem I also encountered a
> surprising number of SELinux violations.  The following details the
> SELinux settings that I ultimately had to apply as a local module.
> This took a considerable period of time as each had to be triggered
> in turn in order that the error be identified.

> #============= postgresql_t ==============
> allow postgresql_t var_lib_t:dir rmdir;
> allow postgresql_t var_lib_t:file { write getattr link read unlink
> append };

> Is this to be expected?

AFAIK, the Red Hat RPMs work out-of-the-box with SELinux; I'm a bit
surprised to hear that the PGDG ones don't, because last I heard
they use the same file layout.  What the above sounds like to me is that
the data directory tree wasn't correctly labeled as postgresql_db_t.
Maybe a restorecon would have helped?

            regards, tom lane

pgsql-general by date:

Previous
From: Rich Shepard
Date:
Subject: Proper Permissions for /usr/local/pgsql/data
Next
From: Tom Lane
Date:
Subject: Re: PG_ERROR 42501 permissions error