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 Joshua D. I am pretty sure you are missing something. Regards, Graham -- smime.p7s (4K) Download Attachment Joshua D. http://gsbook.org/could-not/postgresql-error-could-not-set-permissions-on-directory-permission-denied.php
Regex with sed command to parse json text What does this symbol of a car balancing on two wheels mean? It's better to use semanage as discussed in the next page of the linked manual. Turn off the targeted SELinux policy for PostgreSQL, or relabel the /postgresql/ mount point correctly as system_u:object_r:postgresql_db_t:s0 so Pg is allowed to access it. –Craig Ringer Dec 3 '13 at 7:01 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
more stack exchange communities company blog Stack Exchange Inbox Reputation and Badges sign up log in tour help Tour Start here for a quick overview of the site Help Center Detailed Drake wrote: > I am pretty sure you are missing something. The server is a standard REHL5 installed copy of postgresql, running as the postgres user (as is standard on RHE5). postgresql folder installation And my postgresql is installed without any problem.
It thus seems likely that you are having issues with SELinux. Could Not Set Permissions On Directory Postgres Windows This script file is called "Z_Build_DB_Linux.sql" I am trying to run psql in batch mode as follows (long command, line wrapped here): Code: /opt/PostgreSQL/9.0/bin/psql --dbname postgres --host localhost --port 5432 --username What is a real-world metaphor for irrational numbers? https://www.postgresql.org/message-id/[email protected] Just make a test program that chmod's, sleeps awhile, and chmod's again, and manually change the permissions while it's sleeping, in the same way that you did in the problem case.
Why wouldn't the part of the Earth facing the Sun a half year before be facing away from it now at noon? Postgres Tablespace Location 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, 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'; Code: sudo apt-add-repository ppa:pitti/postgresql sudo apt-get update sudo apt-get install postgresql-9.0 sudo apt-get install postgresql-client-9.0 sudo apt-get install postgresql-contrib-9.0 sudo apt-get install pgadmin3 Now everything working.
Redhat Enterprise Linux 5 refuses to allow a user to chmod a directory, even though that user owns that directory. Or that I am running as the wrong user? Postgres Create Tablespace Permission Denied Windows What are these boxes mounted inline on each of the 3 phase wires of a high voltage power line in Miami? Error: Could Not Set Permissions On Directory Operation Not Permitted Andras ---------------------------(end of broadcast)--------------------------- TIP 1: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [hidden email] so that your message can get
initdb: could not change permissions of directory "D:/PostgreSQL/9.1/data": Permission denied Called Die(Failed to initialise the database cluster with initdb)... 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 Andras ---------------------------(end of broadcast)--------------------------- TIP 3: Have you checked our extensive FAQ? Source To use a nondefault tablespace, you'd want to tweak the policy to allow postgres to write that directory tree too.
For info: abandoned the previous approach in favour of... Postgres Change Tablespace I can not reproduce your issue: [email protected]:~$ mkdir /tmp/foo [email protected]:~$ psql -U postgres postgres=# \h create tablespace Command: CREATE TABLESPACE Description: define a new tablespace Syntax: CREATE TABLESPACE tablespacename But it would have to match the ownership of the data directory, so it's hard to see how a simple restart would fix it. [ thinks... ] Hm, is the tablespace
What this code should be doing is checking that the permissions on the directory are 0700, and failing if they are not, leaving it up to the user to fix the Your PostgreSQL is running as user postgres, which is the same owner as the directory. What/where am I going wrong? Postgresql Create Table If Not Exists File /var/log/postgresql/postgresql-8.1-main.log gives the same error that psql does, and there's nothing in syslog.
Drake Reply | Threaded Open this post in threaded view ♦ ♦ | Report Content as Inappropriate ♦ ♦ Re: Could not create a tablespace - permission denied Graham Leggett the user is postgres [[email protected] contrib]# ps -ef|grep postgres postgres 1971 1 0 08:21 ? 00:00:01 /usr/bin/postmaster -p 5432 -D /var/lib/pgsql/data I'm running on CentOS. In fact, NFS has enough weirdnesses that I wouldn't recommend running a database over it ... have a peek here I'm too cold, turn up the temperature The female equivalent of "don't break my balls" GameObject with Audio File called with FindGameObjectWithTag returns "Object reference not set to an instance of
http://archives.postgresql.org/ Leonel Nunez-2 Reply | Threaded Open this post in threaded view ♦ ♦ | Report Content as Inappropriate ♦ ♦ Re: [GENERAL] Permission problem with create tablespace In reply The time now is 11:46 AM. Who were the red-robed citizens of Jedha City? Doing something like: mkdir /BSTablespace chown postgres:postgres /BSTablespace and then CREATE TABLESPACE magdat OWNER maggie LOCATION '/BSTablespace'; should work fine.
Any help appreciated. -- Ron Johnson, Jr. Maybe the server had not been running under the userid you thought it was? The following is a bit long-winded and cross-relates to PostgreSQL, but I'm sure others are using it on Ubuntu so might offer help. Adding a user to a group doesn't mean anything until > that user reinitializes the environment.
Yes, I'd like to avoid that if at all possible. 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. When run this should create my entire project database, including loading sample data. I just create a new folder, i named it "dodol" set the permission to "everyone" and install my postgresql into that folder.
there is no "cacheing of credentials" in there that I know about.