pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
CREATE TABLE in PUBLIC schema
4+ messages / 2 participants
[nested] [flat]

* CREATE TABLE in PUBLIC schema
@ 2002-11-13 11:13  Heni Lolov <hal_bg@yahoo.com>
  0 siblings, 1 reply; 4+ messages in thread

From: Heni Lolov @ 2002-11-13 11:13 UTC (permalink / raw)
  To: pgsql-admin

Hi
I have just downloaded and installed PgSQL 7.3b5.
Unfortunately the same problem is still there. There 
is no way to diallow creating tables in the database. 
Every user is able to crete tables in every database.

So there is no much sence to disallow users to create
schemas when they can create tables. in fact the same 
security problem remains if someone wants to fill your 
database (respectively filesystem) with bulk.  

I have waited for this feature since v 6.5 but I am very 
dissaopinted. 
Is this the new security ?!?

SO WILL THERE EVER BE POSSIBLE TO DISALLOW
OBJECT CREATION TO USERS AND TO GIVE THEM 
ONLY READ ACCESS TO SOME OBJECTS IN A DB?
 
10x a lot!

Hal

__________________________________________________
Do you Yahoo!?
U2 on LAUNCH - Exclusive greatest hits videos
http://launch.yahoo.com/u2



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: CREATE TABLE in PUBLIC schema
@ 2002-11-13 14:31  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Heni Lolov <hal_bg@yahoo.com>
  0 siblings, 1 reply; 4+ messages in thread

From: Tom Lane @ 2002-11-13 14:31 UTC (permalink / raw)
  To: Heni Lolov <hal_bg@yahoo.com>; +Cc: pgsql-admin

Heni Lolov <hal_bg@yahoo.com> writes:
> SO WILL THERE EVER BE POSSIBLE TO DISALLOW
> OBJECT CREATION TO USERS AND TO GIVE THEM 
> ONLY READ ACCESS TO SOME OBJECTS IN A DB?

If you'd quit shouting and RTFM, you'd find out that it's possible in
7.3.  (Hint: drop the public schema or revoke privileges on it.)

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: CREATE TABLE in PUBLIC schema
@ 2002-11-13 15:58  Heni Lolov <hal_bg@yahoo.com>
  parent: Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 4+ messages in thread

From: Heni Lolov @ 2002-11-13 15:58 UTC (permalink / raw)
  To: pgsql-admin

Sorry :)
forgive me please!

ive tried :
revoke all ON schema public from hal;
but does not work. Why?

with drop it worked :)
Ive got :
ERROR:  No namespace has been selected to create in

regards,
hal


--- Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Heni Lolov <hal_bg@yahoo.com> writes:
> > SO WILL THERE EVER BE POSSIBLE TO DISALLOW
> > OBJECT CREATION TO USERS AND TO GIVE THEM 
> > ONLY READ ACCESS TO SOME OBJECTS IN A DB?
> 
> If you'd quit shouting and RTFM, you'd find out that it's possible in
> 7.3.  (Hint: drop the public schema or revoke privileges on it.)
> 
> 			regards, tom lane
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster


__________________________________________________
Do you Yahoo!?
U2 on LAUNCH - Exclusive greatest hits videos
http://launch.yahoo.com/u2



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: CREATE TABLE in PUBLIC schema
@ 2002-11-13 17:47  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Heni Lolov <hal_bg@yahoo.com>
  0 siblings, 0 replies; 4+ messages in thread

From: Tom Lane @ 2002-11-13 17:47 UTC (permalink / raw)
  To: Heni Lolov <hal_bg@yahoo.com>; +Cc: pgsql-admin

Heni Lolov <hal_bg@yahoo.com> writes:
> ive tried :
> revoke all ON schema public from hal;
> but does not work. Why?

You'd need to revoke the permissions from PUBLIC; they were never granted
specifically to hal, thus the above revoke is a no-op.

Don't forget to revoke CREATE at the database level, too, else a user
can just create his own schema.  Perhaps also revoke TEMP, depending on
whether you'd like to forbid temporary tables as well.

In short, something like

revoke create on schema public from public;
revoke create,temp on database mydb from public;

should give you a database in which users can't create anything.

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 4+ messages in thread


end of thread, other threads:[~2002-11-13 17:47 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2002-11-13 11:13 CREATE TABLE in PUBLIC schema Heni Lolov <hal_bg@yahoo.com>
2002-11-13 14:31 ` Tom Lane <tgl@sss.pgh.pa.us>
2002-11-13 15:58   ` Heni Lolov <hal_bg@yahoo.com>
2002-11-13 17:47     ` Tom Lane <tgl@sss.pgh.pa.us>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox