The command I'm using is: CREATE TABLESPACE magdat OWNER maggie LOCATION '/home/john/BSTablespace' I get the error: ERROR: could not set permissions on directory "/home/john/BSTablespace": Operation not permitted The folder belongs to 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 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. regards, tom lane -- Sent via pgsql-admin mailing list ([hidden email]) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-admin Graham Leggett Reply | Threaded Open this post in threaded view ♦ ♦ have a peek at this web-site

Get out of the transit airport at Schengen area and the counting of Schengen period Parents disagree on type of music for toddler's listening Does a byte contain 8 bits, or Browse other questions tagged postgresql tablespace chown or ask your own question. For details and our forum data attribution, retention and privacy policy, see here [Date Prev][Date Next] [Thread Prev][Thread Next] [Thread Index] [Date Index] [Author Index] Re: [rhelv5-list] Postgresql: Could I think what you're describing must be a kernel bug --- want to see if you can reproduce it without PG involved?

psql:/home/gary/PostgreSQL/9.0/data/gjd_data/Z_Build_DB_Linux.sql:48: ERROR: could not set permissions on directory "/home/gary/PostgreSQL/9.0/data/gjd_data/gjd_sentinel_data": Permission denied For info the statement in the script that is causing the problem: Code: CREATE TABLESPACE sentinel_data OWNER sentinel LOCATION E'/home/gary/PostgreSQL/9.0/data/gjd_data/gjd_sentinel_data'; I can not reproduce your issue: Do it like this: - mkdir /tmp/foo - chown user:user /tmp/foo - edit /etc/group and add postgres to the group user - attempt to access What does this symbol of a car balancing on two wheels mean? How To Create A Tablespace In Postgresql This used to work before.

Drake In response to Re: Could not create a tablespace - permission denied at 2008-04-19 16:08:43 from Graham Leggett Responses Re: Could not create a tablespace - permission denied at 2008-04-19 Could Not Set Permissions On Directory Postgres Windows Is it possible to have 3 real numbers that have both their sum and product equal to 1? Dual boot with Windows XP Home Adv Reply August 18th, 2011 #2 gargoyle60 View Profile View Forum Posts Private Message 5 Cups of Ubuntu Join Date Jun 2009 Location Kent, https://www.postgresql.org/message-id/legacy/pgsql-bugs/2008-04/msg00132.php I tried to troubleshot this by using : sudo sysctl -w kern.sysv.shmall=65536 sudo sysctl -w kern.sysv.shmmax=16777216 But nothing work out.

The machine does not have SELinux installed, never mind enabled. Postgres Change Tablespace The default selinux policy disallows the postgres daemon from writing anywhere outside the standard /var/lib/pgsql/data directory tree. Comment 2 Graham Leggett 2008-04-19 11:32:57 EDT As it turned out, the postgresql server had cached permission credentials, so while the postgres user could see the directory without a problem, this what directory needs to be in my path to run initdb?1Problems while connecting to a newly installed PostgreSQL 9.2 on same box as 9.10Can't connect to local Postgres databases3Postgresql 9.2.6 ignoring

Is it possible to have 3 real numbers that have both their sum and product equal to 1? Check This Out why do they give the same output? Possible reasons: (1) Is the server tryng to start/run as the postgres user? (Check the startup scripts) ; Are there multiple users named postgres with different UIDs? (check /etc/passwd) ; etc… I *have* heard of strange cacheing behaviors on NFS. Postgres Tablespace Permissions

This saves the admin going on a wild goose chase trying to work out why the postgres user cannot chmod a directory owned by the postgres user to 0700, when the Drake Reply | Threaded Open this post in threaded view ♦ ♦ | Report Content as Inappropriate ♦ ♦ Re: Could not create a tablespace - permission denied Graham Leggett Is ATC communication subject to FCC profanity regulations? http://gsbook.org/could-not/postgresql-error-could-not-set-permissions-on-directory-permission-denied.php Regex with sed command to parse json text "Shields at 10% one more hit and..." What?

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.

Any ideas what I could be doing wrong? Locate its directory and type the full path of createdb, as in /Applications/Postgres.app/Contents/MacOS/bin/createdb, and/or change your $PATH as suggested in postgresapp's doc. Does anyone know for sure whether postgres tablespaces are known to work at all on the RHEL5 platform? Postgresql Create Table If Not Exists Ubuntu Ubuntu Insights Planet Ubuntu Activity Page Please read before SSO login Advanced Search Forum The Ubuntu Forum Community Ubuntu Official Flavours Support General Help [SOLVED] Permissions error with PostgreSQL psql

What/where am I going wrong? [email protected]:/home/gary/PostgreSQL/9.0/data/gjd_data# ls -l total 48 drwxrwxrwx 13 postgres postgres 4096 2011-08-12 15:21 gjd_sentinel_data -rw-r--r-- 1 root root 10701 2011-08-12 16:46 Z_Build_DB_Linux.log -rw-r--r-- 1 root root 231 2011-08-12 16:46 Z_Build_DB_Linux_query_output.log -rwxr--r-- 1 In particular, it looks like the list of groups you belong to is typically only computed at login time (or equivalently su -l, which is what's happening in the postgres init http://gsbook.org/could-not/postgresql-tablespace-could-not-set-permissions-on-directory.php Maybe the server had not been running under the userid you thought it was?