Re: Alternate db location

From: Marco Colombo <pgsql(at)esiway(dot)net>
To: rwhart(at)mchsi(dot)com
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Alternate db location
Date: 2005-02-15 16:52:57
Message-ID: Pine.LNX.4.61.0502151658450.18326@Megathlon.ESI
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, 15 Feb 2005 rwhart(at)mchsi(dot)com wrote:

> Hi all,
> I am installing 8.0.1 on FC3. The initial installatin went well. I am now
> trying to change and use a different directory /pg_data. I have established and
> exportede PGDATA and it is /pg_data. I have mkdir /pg_data and changed the
> owner to postgres and run chmod with 700 on the directory. Whenever it log in as
> user postgres and run initdb I get the output of the attached file.
> Does anyone have any ideas? AFAIK I have follwed the docs.
>
> Thanks,
>
> Bob Hartung

Are you running SElinux with the targeted policy, in enforced mode?
I think this is FC3 default. Check /var/log/messages for audit errors.

You need to modify your policy if you want PostgreSQL (or any other
daemons affected by the targeted policy, that is most of them) to be able
to access data in non standard directories. I've been through it, it's not
that hard. Alternatively, you may run SElinux in permissive mode or
disable it entirely. See /etc/sysconfig/selinux (there's also a GUI tool
to set SElinux behaviour but I always forget its name). Please note
that disabling SElinux affects the security of _all_ daemons.

As a quick test, you may run:

# setenforce 0

and then launch the initdb. Watch for audit errors in messages.

BTE, has anyone tried with:

setsebool postgresql_disable_trans=0 ?

Unluckily, I don't have a test host at hand at the moment. Maybe
in the targeted policy that's enough to disable controls on PostgreSQL,
while leaving other daemons confined. I'm not sure, tho, I'm just getting
started with SElinux.

.TM.
--
____/ ____/ /
/ / / Marco Colombo
___/ ___ / / Technical Manager
/ / / ESI s.r.l.
_____/ _____/ _/ Colombo(at)ESI(dot)it

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Ruben Oliveira 2005-02-15 17:00:51 Re: problem with dots in order by
Previous Message Serguei A. Mokhov 2005-02-15 16:43:34 Re: database encoding "WIN" -- Western or Cyrillic?