pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Bruno Wolff III <bruno@wolff.to>
To: Tad Marko <tmarko@metrosplash.com>
Cc: Bradley Kieser <brad@kieser.net>
Cc: pgsql-admin@postgresql.org
Subject: Re: Limiting user privileges
Date: Tue, 11 Jan 2005 23:49:23 -0600
Message-ID: <20050112054923.GA7867@wolff.to> (raw)
In-Reply-To: <1105480172.8275.27.camel@boojiboy.metrosplash.com>
References: <1105377550.11245.0.camel@boojiboy.metrosplash.com>
	<20050110183111.GA2279@winnie.fuhr.org>
	<1105475175.8275.7.camel@boojiboy.metrosplash.com>
	<20050111211839.GC19876@wolff.to>
	<41E443C2.3090800@kieser.net>
	<1105480172.8275.27.camel@boojiboy.metrosplash.com>

On Tue, Jan 11, 2005 at 15:49:32 -0600,
  Tad Marko <tmarko@metrosplash.com> wrote:
> 
> In MySQL (the only DB I'm very familiar with), I can create a database,
> import tables, create a user, and then
> 
> GRANT ALL ON dbname.* TO whateveruser
> 
> and then whateveruser is essentially the super user on that database. I
> think that I understand that in PostgreSQL, I need to make whateveruser
> the owner of the database, then I won't have to go through the GRANT
> step for him.

Making someone the owner of a database isn't going to give that person
access to all other objects in the database. When other users create
objects the database owner won't in general have access to them.

> But, what do I need to do if I need to say easily create users that have
> INSERT and SELECT privileges on all (of a large number of) tables in a
> given database?

You need to write a script or function that gives them appropiate access
to all existing objects. Another possible solution is to have a policy
of giving a specific group access to all objects that are created in the
database. Then you can give new users access to these objects by just
adding them to the group.



view thread (8+ messages)

Message-ID: <20050112054923.GA7867@wolff.to>
Permalink:  ../20050112054923.GA7867@wolff.to/
Also on:    postgresql.org/message-id/20050112054923.GA7867@wolff.to

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: bruno@wolff.to, tmarko@metrosplash.com, brad@kieser.net
  Subject: Re: Limiting user privileges
  In-Reply-To: <20050112054923.GA7867@wolff.to>
  References: <1105377550.11245.0.camel@boojiboy.metrosplash.com> <20050110183111.GA2279@winnie.fuhr.org> <1105475175.8275.7.camel@boojiboy.metrosplash.com> <20050111211839.GC19876@wolff.to> <41E443C2.3090800@kieser.net> <1105480172.8275.27.camel@boojiboy.metrosplash.com> <20050112054923.GA7867@wolff.to>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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