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
for help with psql commands > \g or terminate with semicolon to execute query > \q to quit > > postgres=# CREATE TABLESPACE mspace LOCATION Doing something like: mkdir /BSTablespace chown postgres:postgres /BSTablespace and then CREATE TABLESPACE magdat OWNER maggie LOCATION '/BSTablespace'; should work fine. Regarding the user maggie: database users are not the same as OS users.
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
Browse other questions tagged linux ubuntu permissions postgresql or ask your own question. https://www.redhat.com/archives/rhelv5-list/2008-April/msg00213.html initdb: could not change permissions of directory "/postgres_data": Operation not permitted –user3001937 Jan 17 '14 at 22:31 Try executing the command as the postgres user su postgres –Fabrizio Mazzoni Postgres Create Tablespace Permission Denied Windows Regards, Graham -- I'd check that the user postgresql is running as can create files in /home/chandler/fma/db/pgsql # assuming postgres is the user su - postgres touch /home/chandler/fma/db/pgsql/foo rm /home/chandler/fma/db/pgsql/foo Hugh Error: Could Not Set Permissions On Directory Operation Not Permitted http://www.postgresql.org/docs/faq ‹ Previous Thread Next Thread › « Return to PostgreSQL - general | 1 view|%1 views Loading...
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?
Why?1which postgres do i have installed? Postgres Tablespace Location for help with psql commands \g or terminate with semicolon to execute query \q to quit dupe_filenames=# \du Regards, Graham -- smime.p7s (4K) Download Attachment Joshua D.
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?
Regards, Graham -- smime.p7s (4K) Download Attachment Tom Lane-2 Reply | Threaded Open this post in threaded view ♦ ♦ | Report Content as Inappropriate ♦ ♦ Re: Could not