Re: Could not create a tablespace - permission denied

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Graham Leggett <minfrin(at)sharp(dot)fm>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: Could not create a tablespace - permission denied
Date: 2008-04-19 15:34:01
Message-ID: 9189.1208619241@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Graham Leggett <minfrin(at)sharp(dot)fm> writes:
> While attempting to create a tablespace as the postgres user under RHEL5
> with *no* SELinux enabled, I get the following error:

> postgres=# CREATE TABLESPACE fma LOCATION '/home/chandler/fma/db/pgsql';
> ERROR: could not set permissions on directory
> "/home/chandler/fma/db/pgsql": Permission denied

> The user postgres is able to access the directory, and the user postgres
> is able to set permissions on the directory to 0700:

> -bash-3.1$ chmod 700 /home/chandler/fma/db/pgsql

If you can do that from a shell running as postgres, then I think
selinux is not so disabled as you think. Ordinary file permissions are
applied uniformly to all processes running as a given userid, but
selinux is different.

regards, tom lane

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Graham Leggett 2008-04-19 15:42:45 Re: Could not create a tablespace - permission denied
Previous Message Graham Leggett 2008-04-19 12:58:35 Could not create a tablespace - permission denied