On 10/16/06 20:17, Douglas McNaught wrote: > "Andras Simon" <szajmi@xxxxxxxxx> 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. > > SELinux, most likely. In my case, it is *not* SELinux, since I'm not running it... Debian Sid PostgreSQL 8.1.5 (distro version 8.1.5-1) As you can see from the attached file, user "me" is a Superuser and is a member of group postgres, and *is* able to create files in that directory. File /var/log/postgresql/postgresql-8.1-main.log gives the same error that psql does, and there's nothing in syslog. Any help appreciated. -- Ron Johnson, Jr. Jefferson LA USA Is "common sense" really valid? For example, it is "common sense" to white-power racists that whites are superior to blacks, and that those with brown skins are mud people. However, that "common sense" is obviously wrong.
~$ dir /data/02/share | grep datab drwxrwxr-x 2 me postgres 4096 2006-10-16 21:38 database/ ~$ touch /data/02/share/database/testing.testing ~$ dir /data/02/share/database total 8 drwxrwxr-x 2 me postgres 4096 2006-10-16 21:53 ./ drwxrwxr-x 16 me people 4096 2006-10-16 21:38 ../ -rw-r--r-- 1 me me 0 2006-10-16 21:53 testing.testing $ psql -U me dupe_filenames Welcome to psql 8.1.5, the PostgreSQL interactive terminal. Type: \copyright for distribution terms \h for help with SQL commands \? for help with psql commands \g or terminate with semicolon to execute query \q to quit dupe_filenames=# \du List of roles Role name | Superuser | Create role | Create DB | Connections | Member of -----------+-----------+-------------+-----------+-------------+----------- me | yes | yes | yes | no limit | postgres | yes | yes | yes | no limit | (2 rows) dupe_filenames=# create tablespace thisisatest dupe_filenames-# owner me dupe_filenames-# location '/data/02/share/database'; ERROR: could not set permissions on directory "/data/02/share/database": Operation not permitted
Attachment:
signature.asc
Description: OpenPGP digital signature