Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-general by date

Next:From: Andras SimonDate: 2006-10-17 01:44:02
Subject: Re: Permission problem with create tablespace
Previous:From: Douglas McNaughtDate: 2006-10-17 01:17:50
Subject: Re: Permission problem with create tablespace

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group