pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Vinicius <cviniciusm@terra.com.br>
Cc: pgsql-admin@postgresql.org
Subject: Re: Having problem with postgresql configuration (template1 doesn't exist)?
Date: Sun, 20 Feb 2005 12:48:36 -0500
Message-ID: <15094.1108921716@sss.pgh.pa.us> (raw)
In-Reply-To: <cva248$c68$1@sea.gmane.org>
References: <cva248$c68$1@sea.gmane.org>

Vinicius <cviniciusm@terra.com.br> writes:
> postgres$ initdb -D /usr/local/pgsql/data"

> the file /var/log/messages shows:
> "Feb 20 02:01:38 ronin kernel: audit(1108875698.227:0): avc:  denied  { 
> write } for  pid=8229 exe=/usr/bin/postgres name=data
> dev=dm-0 ino=1687533 scontext=user_u:system_r:postgresql_t 
> tcontext=root:object_r:usr_t tclass=dir

You can't put the data directory in a nonstandard place under SELinux
unless you modify the security policy to allow the postgres daemon to
write in that nonstandard place.  The normal behavior of
selinux-policy-targeted is to confine postgres to /var/lib/pgsql.

So: (1) use /var/lib/pgsql/data, (2) modify the policy, or (3)
disable SELinux enforcement.

BTW, since you are using the RPMs, why are you bothering with manual
database setup?  "sudo /sbin/service postgresql start" is all you
need to do.

			regards, tom lane



view thread (9+ messages)  latest in thread

Message-ID: <15094.1108921716@sss.pgh.pa.us>
Permalink:  ../15094.1108921716@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/15094.1108921716@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: tgl@sss.pgh.pa.us, cviniciusm@terra.com.br
  Subject: Re: Having problem with postgresql configuration (template1 doesn't exist)?
  In-Reply-To: <15094.1108921716@sss.pgh.pa.us>
  References: <cva248$c68$1@sea.gmane.org> <15094.1108921716@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox