Re: Default privileges for new databases (was Re: Can't import - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: Default privileges for new databases (was Re: Can't import
Date
Msg-id 200209290247.g8T2lgC11785@candle.pha.pa.us
Whole thread Raw
In response to Re: Default privileges for new databases (was Re: Can't import large objects in most recent cvs)  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Default privileges for new databases (was Re: Can't import large objects in most recent cvs)  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Tom Lane wrote:
> Bruce Momjian <pgman@candle.pha.pa.us> writes:
> > Can someone tell me where we are on this;  exactly what writability do
> > we have in 7.3?
> 
> The current code implements what I suggested in that note, viz:
> default permissions for new databases are
>     owner = all rights (ie, create schema and create temp)
>     public = create temp right only
> but template1 and template0 are set to
>     owner (postgres user) = all rights
>     public = no rights
> by initdb.
> 
> Also, the "public" schema within template1 is empty but writable by
> public.  This is annoying, but at least it's easy to fix if you
> mess up --- you can DROP SCHEMA public CASCADE and then recreate
> the schema.  (Or not, if you don't want to.)

OK, yes, this is what I thought, that public in all databases is
world-writable, but you can control that by dropping and recreating the
public schema, or altering the schema, right?

How did you get temp schemas non-world writable in template1 but not in
the databases, or am I confused?

--  Bruce Momjian                        |  http://candle.pha.pa.us pgman@candle.pha.pa.us               |  (610)
359-1001+  If your life is a hard drive,     |  13 Roberts Road +  Christ can be your backup.        |  Newtown Square,
Pennsylvania19073
 


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [PATCHES] Cascaded Column Drop
Next
From: Rod Taylor
Date:
Subject: Re: [PATCHES] Cascaded Column Drop