Re: granting permission to groups?

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: "Frank P(dot) Miles" <fpmi(at)home(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: granting permission to groups?
Date: 2000-04-11 21:38:44
Message-ID: Pine.LNX.4.21.0004102342100.460-100000@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Frank P. Miles writes:

> Sorry for my lack of specificity. Using the syntax in the 'GRANT'
> section of the Postgresql manual, I inserted a group into pg_group,
> then created users within that group, then granted SELECT permissions
> for the group. There were no error messages; these steps appeared to
> work properly. Unfortunately, users are still unable to do SELECTs,
> though they are able to do a 'psql database-name', and list the
> tables.

Let's see ...

peter=# create user unpriv;
CREATE USER
peter=# create table test (a int);
CREATE
peter=# \c - unpriv
You are now connected as new user unpriv.
peter=> select * from test;
ERROR: test: Permission denied.
peter=> \c - peter
You are now connected as new user peter.
peter=# create group testgrp with user unpriv;
CREATE GROUP
peter=# grant select on test to group testgrp;
CHANGE
peter=# \c - unpriv
You are now connected as new user unpriv.
peter=> select * from test;
a
---
(0 rows)

Looks okay.

The permission checking code didn't change (to my knowledge) since 6.5, so
yes, it should work. If it still doesn't work for you I'd need to see
pg_users, pg_group and the output of \d and \z in psql.

--
Peter Eisentraut Sernanders väg 10:115
peter_e(at)gmx(dot)net 75262 Uppsala
http://yi.org/peter-e/ Sweden

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Oscar 2000-04-11 21:47:30 Search problem
Previous Message Peter Eisentraut 2000-04-11 21:38:26 Re: Features