From: | bradawk <vanordenb(at)varentech(dot)com> |
---|---|
To: | pgsql-novice(at)postgresql(dot)org |
Subject: | database in different location owned by different user |
Date: | 2012-06-01 16:00:06 |
Message-ID: | 1338566406877-5710987.post@n5.nabble.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-novice |
I'm very new to PostgreSQL. So, I apologize if this seems trivial. :)
I have a RHEL 5 system on which I have installed PostgreSQL 8.4.9 from rpms.
The developers use the 'appdev' account for all of their common activities.
All of their files/applications I restrict to the file system under /tp. I
want to give appdev full rights over a database hosted at /tp/db. The /tp
directory (and all below it are owned by appdev). I've done:
chkconfig --level 5 postgresql on
service postgresql initdb
service postgresql start
su - postgres
psql -d template1 -U postgres
CREATE ROLE appdev SUPERUSER CREATEDB CREATEROLE INHERIT LOGIN PASSWORD
'somepassw';
\q
service postgresql restart
su - appdev
psql -d template1 -U appdev
I'm not really sure how to create the datbase. I tried:
CREATE TABLESPACE Jira OWNER appdev LOCATION '/tp/db';
but it tells me that it could not set permissions on "tp/db."
I tried:
CREATE DATABASE jira WITH OWNER = appdev TEMPLATE = DEFAULT TABLESPACE =
Jira;
Any clues on how I create a database in a non-standard location owned by a
user other than postgres?
Thanks!
I'm not really sure how to create the database from here.
--
View this message in context: http://postgresql.1045698.n5.nabble.com/database-in-different-location-owned-by-different-user-tp5710987.html
Sent from the PostgreSQL - novice mailing list archive at Nabble.com.
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2012-06-01 19:05:49 | Re: database in different location owned by different user |
Previous Message | Ross Boylan | 2012-05-31 20:36:52 | Re: permissions/building commands from variables |