Re: Permission problem with create tablespace

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Andras Simon" <szajmi(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Permission problem with create tablespace
Date: 2006-10-17 01:36:58
Message-ID: 8626.1161049018@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"Andras Simon" <szajmi(at)gmail(dot)com> writes:
> I'm trying to create a new tablespace in a directory that postgres
> owns, but PG says it cannot set permissions on this directory.
> ...
> This is on Fedora Core 5 (x86), psql 8.1.4.

Do you have selinux enabled? The default selinux policy disallows the
postgres daemon from writing anywhere outside the standard
/var/lib/pgsql/data directory tree. Check for "avc denied" messages in
the kernel log to verify this.

To use a nondefault tablespace, you'd want to tweak the policy to allow
postgres to write that directory tree too. I'm afraid I know too little
about selinux to explain exactly what to do though ... need to learn
that someday ...

A quick and dirty solution is to put selinux into non-enforcing mode,
but if this machine is exposed to the internet at all, that's probably
not a good answer.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Andras Simon 2006-10-17 01:44:02 Re: Permission problem with create tablespace
Previous Message Douglas McNaught 2006-10-17 01:17:50 Re: Permission problem with create tablespace