From: Stephan Szabo <sszabo@megazone23.bigpanda.com>
To: Matt Perry <matt@primefactor.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: Restricting database access to certain users
Date: Mon, 26 May 2003 19:49:33 -0700 (PDT)
Message-ID: <20030526194806.F86210-100000@megazone23.bigpanda.com> (raw)
In-Reply-To: <Pine.LNX.4.44.0305261658350.29902-100000@betty.cometsite.com>
On Mon, 26 May 2003, Matt Perry wrote:
> I'm looking into migrating several users from MySQL to Postgres and I'm
> running into a problem with security. I don't think I understand how
> security is handled within postgres. I'm using PostgreSQL v7.1.3 on a Red
> Hat 7.2 system.
>
> The problem is that there appears to not be a way to prevent users from
> accessing each other's databases and creating new objects in them. As a
> test, I created userB and userB and then created databaseA and databaseB.
> I then connected to databasea as usera and created a table with one row of
> data. I did the same with databaseb and userb.
>
> Next, I connected to databasea as userb and created a table. Sure enough,
> postgres allowed me to create the table in databasea as userb. Only userb
> could access this table.
>
> I wish to prevent such a situation. There doesn't seem to be a way to do
> so. I can grant and revoke permissions on tables but not on databases as
> a whole.
In 7.3 you can pretty much do what you want. You may want to look into
upgrading.
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: sszabo@megazone23.bigpanda.com, matt@primefactor.com
Subject: Re: Restricting database access to certain users
In-Reply-To: <20030526194806.F86210-100000@megazone23.bigpanda.com>
References: <Pine.LNX.4.44.0305261658350.29902-100000@betty.cometsite.com> <20030526194806.F86210-100000@megazone23.bigpanda.com>
* 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