Re: Privileges question

From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: "Alexander James Spence [axs]" <axs(at)aber(dot)ac(dot)uk>, "'pgsql-admin(at)postgresql(dot)org'" <pgsql-admin(at)postgresql(dot)org>
Subject: Re: Privileges question
Date: 2011-10-18 16:27:06
Message-ID: 4E9D628A0200002500042183@gw.wicourts.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

"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;
CREATE ROLE
test=# create database xxx owner xxx;
CREATE DATABASE
test=# \c xxx
You are now connected to database "xxx" as user "kgrittn".
xxx=# revoke create on database xxx from public;
REVOKE
xxx=# revoke create on schema public from public;
REVOKE
xxx=# grant create on schema public to xxx;
GRANT

You might also want to limit connection rights in pg_hba.conf

-Kevin

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Alexander James Spence [axs] 2011-10-18 17:18:19 Re: Privileges question
Previous Message Alexander James Spence [axs] 2011-10-18 16:15:57 Privileges question