pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
REVOKE not working...
8+ messages / 4 participants
[nested] [flat]

* REVOKE not working...
@ 2004-10-20 14:17  Joe Maldonado <jmaldonado@webehosting.biz>
  0 siblings, 2 replies; 8+ messages in thread

From: Joe Maldonado @ 2004-10-20 14:17 UTC (permalink / raw)
  To: pgsql-admin

Hello all,
    I have created users for which I have restricted access to SELECT 
from a set of tables, this works :)
    But when I issue a REVOKE CREATE ON DATABASE mydb FROM myuser;
The user can still create tables...I've also issued this command for the 
SCHEMA and still no go.

Is this a known problem, if so how can I restrict users from creating 
objects in my db?

Thanks,

-Joe



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

* Re: REVOKE not working...
@ 2004-10-20 15:45  Scott Marlowe <smarlowe@qwest.net>
  parent: Joe Maldonado <jmaldonado@webehosting.biz>
  1 sibling, 1 reply; 8+ messages in thread

From: Scott Marlowe @ 2004-10-20 15:45 UTC (permalink / raw)
  To: Joe Maldonado <jmaldonado@webehosting.biz>; +Cc: pgsql-admin

On Wed, 2004-10-20 at 08:17, Joe Maldonado wrote:
> Hello all,
>     I have created users for which I have restricted access to SELECT 
> from a set of tables, this works :)
>     But when I issue a REVOKE CREATE ON DATABASE mydb FROM myuser;
> The user can still create tables...I've also issued this command for the 
> SCHEMA and still no go.
> 
> Is this a known problem, if so how can I restrict users from creating 
> objects in my db?

Is myuser a superuser?  If so, you can revoke all you want and he'll
still be able to do anything he wants.  Also, I think that if myuser
owns the current database he can always create tables in it.




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

* Re: REVOKE not working...
@ 2004-10-21 03:34  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Joe Maldonado <jmaldonado@webehosting.biz>
  1 sibling, 0 replies; 8+ messages in thread

From: Tom Lane @ 2004-10-21 03:34 UTC (permalink / raw)
  To: Joe Maldonado <jmaldonado@webehosting.biz>; +Cc: pgsql-admin

Joe Maldonado <jmaldonado@webehosting.biz> writes:
>     But when I issue a REVOKE CREATE ON DATABASE mydb FROM myuser;
> The user can still create tables...

CREATE privilege on a database concerns the right to create schemas
within the database.  Whether you can create tables within a schema
is a different privilege on a different object.  In particular, the
default setup is that everyone can create tables within the "public"
schema in each database.  Revoke CREATE on that (from PUBLIC, not just
myuser) and you'll start to get somewhere.

			regards, tom lane



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

* Re: REVOKE not working...
@ 2004-10-21 16:49  Joe Maldonado <jmaldonado@webehosting.biz>
  parent: Scott Marlowe <smarlowe@qwest.net>
  0 siblings, 1 reply; 8+ messages in thread

From: Joe Maldonado @ 2004-10-21 16:49 UTC (permalink / raw)
  To: Scott Marlowe <smarlowe@qwest.net>; +Cc: pgsql-admin

Scott Marlowe wrote:

>On Wed, 2004-10-20 at 08:17, Joe Maldonado wrote:
>  
>
>>Hello all,
>>    I have created users for which I have restricted access to SELECT 
>>from a set of tables, this works :)
>>    But when I issue a REVOKE CREATE ON DATABASE mydb FROM myuser;
>>The user can still create tables...I've also issued this command for the 
>>SCHEMA and still no go.
>>
>>Is this a known problem, if so how can I restrict users from creating 
>>objects in my db?
>>    
>>
>
>Is myuser a superuser?  If so, you can revoke all you want and he'll
>still be able to do anything he wants.  Also, I think that if myuser
>owns the current database he can always create tables in it.
>
>
>  
>
myuser is not a superuser.  is the public schema special in that you 
cannot revoke create privileges from users accessing it?

-Joe

>---------------------------(end of broadcast)---------------------------
>TIP 5: Have you checked our extensive FAQ?
>
>               http://www.postgresql.org/docs/faqs/FAQ.html
>  
>




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

* Re: REVOKE not working...
@ 2004-10-21 20:06  Scott Marlowe <smarlowe@qwest.net>
  parent: Joe Maldonado <jmaldonado@webehosting.biz>
  0 siblings, 1 reply; 8+ messages in thread

From: Scott Marlowe @ 2004-10-21 20:06 UTC (permalink / raw)
  To: Joe Maldonado <jmaldonado@webehosting.biz>; +Cc: pgsql-admin

On Thu, 2004-10-21 at 10:49, Joe Maldonado wrote:
> Scott Marlowe wrote:
> 
> >On Wed, 2004-10-20 at 08:17, Joe Maldonado wrote:
> >  
> >
> >>Hello all,
> >>    I have created users for which I have restricted access to SELECT 
> >>from a set of tables, this works :)
> >>    But when I issue a REVOKE CREATE ON DATABASE mydb FROM myuser;
> >>The user can still create tables...I've also issued this command for the 
> >>SCHEMA and still no go.
> >>
> >>Is this a known problem, if so how can I restrict users from creating 
> >>objects in my db?
> >>    
> >>
> >
> >Is myuser a superuser?  If so, you can revoke all you want and he'll
> >still be able to do anything he wants.  Also, I think that if myuser
> >owns the current database he can always create tables in it.
> >
> >
> >  
> >
> myuser is not a superuser.  is the public schema special in that you 
> cannot revoke create privileges from users accessing it?

Is myuser the creator of the database in question?




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

* Re: REVOKE not working...
@ 2004-10-22 13:12  Joe Maldonado <jmaldonado@webehosting.biz>
  parent: Scott Marlowe <smarlowe@qwest.net>
  0 siblings, 1 reply; 8+ messages in thread

From: Joe Maldonado @ 2004-10-22 13:12 UTC (permalink / raw)
  To: Scott Marlowe <smarlowe@qwest.net>; +Cc: pgsql-admin

Scott Marlowe wrote:

>On Thu, 2004-10-21 at 10:49, Joe Maldonado wrote:
>  
>
>>Scott Marlowe wrote:
>>
>>    
>>
>>>On Wed, 2004-10-20 at 08:17, Joe Maldonado wrote:
>>> 
>>>
>>>      
>>>
>>>>Hello all,
>>>>   I have created users for which I have restricted access to SELECT 
>>>>        
>>>>
>>>>from a set of tables, this works :)
>>>      
>>>
>>>>   But when I issue a REVOKE CREATE ON DATABASE mydb FROM myuser;
>>>>The user can still create tables...I've also issued this command for the 
>>>>SCHEMA and still no go.
>>>>
>>>>Is this a known problem, if so how can I restrict users from creating 
>>>>objects in my db?
>>>>   
>>>>
>>>>        
>>>>
>>>Is myuser a superuser?  If so, you can revoke all you want and he'll
>>>still be able to do anything he wants.  Also, I think that if myuser
>>>owns the current database he can always create tables in it.
>>>
>>>
>>> 
>>>
>>>      
>>>
>>myuser is not a superuser.  is the public schema special in that you 
>>cannot revoke create privileges from users accessing it?
>>    
>>
>
>Is myuser the creator of the database in question?
>
>
>---------------------------(end of broadcast)---------------------------
>TIP 6: Have you searched our list archives?
>
>               http://archives.postgresql.org
>  
>
Nope.

-Joe



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

* Re: REVOKE not working...
@ 2004-10-22 13:33  Stephan Szabo <sszabo@megazone.bigpanda.com>
  parent: Joe Maldonado <jmaldonado@webehosting.biz>
  0 siblings, 1 reply; 8+ messages in thread

From: Stephan Szabo @ 2004-10-22 13:33 UTC (permalink / raw)
  To: Joe Maldonado <jmaldonado@webehosting.biz>; +Cc: Scott Marlowe <smarlowe@qwest.net>; pgsql-admin

On Fri, 22 Oct 2004, Joe Maldonado wrote:

> Scott Marlowe wrote:
>
> >On Thu, 2004-10-21 at 10:49, Joe Maldonado wrote:
> >
> >
> >>Scott Marlowe wrote:
> >>
> >>
> >>
> >>>On Wed, 2004-10-20 at 08:17, Joe Maldonado wrote:
> >>>
> >>>
> >>>
> >>>
> >>>>Hello all,
> >>>>   I have created users for which I have restricted access to SELECT
> >>>>
> >>>>
> >>>>from a set of tables, this works :)
> >>>
> >>>
> >>>>   But when I issue a REVOKE CREATE ON DATABASE mydb FROM myuser;
> >>>>The user can still create tables...I've also issued this command for the
> >>>>SCHEMA and still no go.
> >>>>
> >>>>Is this a known problem, if so how can I restrict users from creating
> >>>>objects in my db?
> >>>>
> >>>>
> >>>>
> >>>>
> >>>Is myuser a superuser?  If so, you can revoke all you want and he'll
> >>>still be able to do anything he wants.  Also, I think that if myuser
> >>>owns the current database he can always create tables in it.
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>myuser is not a superuser.  is the public schema special in that you
> >>cannot revoke create privileges from users accessing it?
> >>
> >>
> >
> >Is myuser the creator of the database in question?
> >
> >
> >---------------------------(end of broadcast)---------------------------
> >TIP 6: Have you searched our list archives?
> >
> >               http://archives.postgresql.org
> >
> >
> Nope.

I think Tom said this, but myuser probably doesn't have permission on the
schema, it's probably getting the PUBLIC ("world") permission.  You might
need to revoke create on schema public from public; and then grant rights
to users or groups that you want to give permissions to.



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

* Re: REVOKE not working...
@ 2004-10-22 14:51  Joe Maldonado <jmaldonado@webehosting.biz>
  parent: Stephan Szabo <sszabo@megazone.bigpanda.com>
  0 siblings, 0 replies; 8+ messages in thread

From: Joe Maldonado @ 2004-10-22 14:51 UTC (permalink / raw)
  To: Stephan Szabo <sszabo@megazone.bigpanda.com>; +Cc: Scott Marlowe <smarlowe@qwest.net>; pgsql-admin

Stephan Szabo wrote:

>On Fri, 22 Oct 2004, Joe Maldonado wrote:
>
>  
>
>>Scott Marlowe wrote:
>>
>>    
>>
>>>On Thu, 2004-10-21 at 10:49, Joe Maldonado wrote:
>>>
>>>
>>>      
>>>
>>>>Scott Marlowe wrote:
>>>>
>>>>
>>>>
>>>>        
>>>>
>>>>>On Wed, 2004-10-20 at 08:17, Joe Maldonado wrote:
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>          
>>>>>
>>>>>>Hello all,
>>>>>>  I have created users for which I have restricted access to SELECT
>>>>>>
>>>>>>
>>>>>>            
>>>>>>
>>>>>>from a set of tables, this works :)
>>>>>
>>>>>
>>>>>          
>>>>>
>>>>>>  But when I issue a REVOKE CREATE ON DATABASE mydb FROM myuser;
>>>>>>The user can still create tables...I've also issued this command for the
>>>>>>SCHEMA and still no go.
>>>>>>
>>>>>>Is this a known problem, if so how can I restrict users from creating
>>>>>>objects in my db?
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>            
>>>>>>
>>>>>Is myuser a superuser?  If so, you can revoke all you want and he'll
>>>>>still be able to do anything he wants.  Also, I think that if myuser
>>>>>owns the current database he can always create tables in it.
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>          
>>>>>
>>>>myuser is not a superuser.  is the public schema special in that you
>>>>cannot revoke create privileges from users accessing it?
>>>>
>>>>
>>>>        
>>>>
>>>Is myuser the creator of the database in question?
>>>
>>>
>>>---------------------------(end of broadcast)---------------------------
>>>TIP 6: Have you searched our list archives?
>>>
>>>              http://archives.postgresql.org
>>>
>>>
>>>      
>>>
>>Nope.
>>    
>>
>
>I think Tom said this, but myuser probably doesn't have permission on the
>schema, it's probably getting the PUBLIC ("world") permission.  You might
>need to revoke create on schema public from public; and then grant rights
>to users or groups that you want to give permissions to.
>
>---------------------------(end of broadcast)---------------------------
>TIP 8: explain analyze is your friend
>  
>
Thanks !!! that did it.

-Joe



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


end of thread, other threads:[~2004-10-22 14:51 UTC | newest]

Thread overview: 8+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2004-10-20 14:17 REVOKE not working... Joe Maldonado <jmaldonado@webehosting.biz>
2004-10-20 15:45 ` Scott Marlowe <smarlowe@qwest.net>
2004-10-21 16:49   ` Joe Maldonado <jmaldonado@webehosting.biz>
2004-10-21 20:06     ` Scott Marlowe <smarlowe@qwest.net>
2004-10-22 13:12       ` Joe Maldonado <jmaldonado@webehosting.biz>
2004-10-22 13:33         ` Stephan Szabo <sszabo@megazone.bigpanda.com>
2004-10-22 14:51           ` Joe Maldonado <jmaldonado@webehosting.biz>
2004-10-21 03:34 ` 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