From: | "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com> |
---|---|
To: | Graham Leggett <minfrin(at)sharp(dot)fm> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-admin(at)postgresql(dot)org |
Subject: | Re: Could not create a tablespace - permission denied |
Date: | 2008-04-19 16:14:13 |
Message-ID: | 480A1A55.6090800@commandprompt.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
Graham Leggett wrote:
> After the postgres user was granted permission to access the tablespace
> directory, and after it was verified that the postgres user was able to
> access the tablespace directory, postgresql refused to allow the
> tablespace to be created until the postgresql server was restarted.
I am pretty sure you are missing something. I can not reproduce your issue:
jd(at)scratch:~$ mkdir /tmp/foo
jd(at)scratch:~$ psql -U postgres
postgres=# \h create tablespace
Command: CREATE TABLESPACE
Description: define a new tablespace
Syntax:
CREATE TABLESPACE tablespacename [ OWNER username ] LOCATION 'directory'
postgres=# create tablespace foobar location '/tmp/foo';
ERROR: could not set permissions on directory "/tmp/foo": Operation not
permitted
postgres=#
[1]+ Stopped psql -U postgres
jd(at)scratch:~$ sudo su -
[sudo] password for jd:
root(at)scratch:~# chown postgres:postgres /tmp/foo
root(at)scratch:~# exit
logout
jd(at)scratch:~$ fg
psql -U postgres
postgres=# create tablespace foobar location '/tmp/foo';
CREATE TABLESPACE
postgres=#
But I am glad your problem is resolved.
Joshua D. Drake
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2008-04-19 16:17:31 | Re: Could not create a tablespace - permission denied |
Previous Message | Graham Leggett | 2008-04-19 16:08:43 | Re: Could not create a tablespace - permission denied |