Skip site navigation (1) Skip section navigation (2)

Re: Privileges question

From: "Alexander James Spence [axs]" <axs(at)aber(dot)ac(dot)uk>
To: Kevin Grittner <Kevin(dot)Grittner(at)wicourts(dot)gov>,"'pgsql-admin(at)postgresql(dot)org'" <pgsql-admin(at)postgresql(dot)org>
Subject: Re: Privileges question
Date: 2011-10-18 17:18:19
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-admin
Thanks Kevin,

That worked, head not quite so sore now ;¬).

If I wanted to set this as a default for all new databases and users how/where do I alter/create a schema other than public?


Sandy Spence
Department of Computer Science
Aberystwyth University
Penglais Campus
Llandinam Building
SY23 3DB
Tel:  01970-622433
Fax: 01970-628536

-----Original Message-----
From: pgsql-admin-owner(at)postgresql(dot)org [mailto:pgsql-admin-owner(at)postgresql(dot)org] On Behalf Of Kevin Grittner
Sent: 18 October 2011 17:27
To: Alexander James Spence [axs]; 'pgsql-admin(at)postgresql(dot)org'
Subject: Re: [ADMIN] Privileges question

"Alexander James Spence [axs]" <axs(at)aber(dot)ac(dot)uk> wrote:
> will have to create around 200+ users and user databases for
> student project use.  I have tried all sorts of GRANT and REVOKE
> combinations but for the life of me cannot stop other users from
> creating tables in a database that is not their own.
test=# create user xxx;
test=# create database xxx owner xxx;
test=# \c xxx
You are now connected to database "xxx" as user "kgrittn".
xxx=# revoke create on database xxx from public;
xxx=# revoke create on schema public from public;
xxx=# grant create on schema public to xxx;
You might also want to limit connection rights in pg_hba.conf

In response to


pgsql-admin by date

Next:From: Kevin GrittnerDate: 2011-10-18 21:03:46
Subject: Re: Privileges question
Previous:From: Kevin GrittnerDate: 2011-10-18 16:27:06
Subject: Re: Privileges question

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group