From: | "Gregory S(dot) Williamson" <gsw(at)globexplorer(dot)com> |
---|---|
To: | "Stephan Szabo" <sszabo(at)megazone(dot)bigpanda(dot)com> |
Cc: | <pgsql-admin(at)postgresql(dot)org> |
Subject: | Re: Keep a user from creating tables ? |
Date: | 2004-05-17 19:38:50 |
Message-ID: | 71E37EF6B7DCC1499CEA0316A2568328010579AC@loki.wc.globexplorer.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
Stephan,
Thanks for the info, but alas, no success.
I have:
List of database users
User name | User ID | Attributes
-----------+---------+----------------------------
testuser | 100 |
postgres | 1 | superuser, create database
And as postgres I ran:
REVOKE ALL ON SCHEMA public FROM testuser;
Then I connect:
psql -d testdb -U testuser
(I should not even be able to connect ?)
And I run:
CREATE TABLE foo (man INT, choo(VARCHAR(20));
And it works ...
Am I misundertanding something, or is it simply not possible to prevent users from creating tables ?
In Informix this quite easy:
REVOKE RESOURCE FROM testuser;
I am puzzled at postgres' documentation, and perhaps at its underlying logic.
Any help would be appreciated -- this is sort of important.
Thanks!
Greg W.
-----Original Message-----
From: Stephan Szabo [mailto:sszabo(at)megazone(dot)bigpanda(dot)com]
Sent: Mon 5/17/2004 8:03 AM
To: Gregory S. Williamson
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: [ADMIN] Keep a user from creating tables ?
On Sun, 16 May 2004, Gregory S. Williamson wrote:
> In postgres 7.4, is there any way to stop a user from creating tables in a given database ?
Make the user not have rights to create objects in any schemas. Most
likely you'd only need to change the public schema, but if you've granted
create rights for other schemas you'll need to revoke those as well.
From | Date | Subject | |
---|---|---|---|
Next Message | Stephan Szabo | 2004-05-17 20:45:10 | Re: Keep a user from creating tables ? |
Previous Message | Jie Liang | 2004-05-17 19:15:51 | Log msg |