Received: from malthouse.demon.co.uk (malthouse.demon.co.uk [194.222.253.161]) by hub.org (8.9.3/8.9.3) with SMTP id KAA83833 for ; Wed, 5 May 1999 10:58:07 -0400 (EDT) (envelope-from greg@malthouse.demon.co.uk) Received: from ystrad [192.168.0.50] by malthouse.demon.co.uk [192.168.0.10] with SMTP (MDaemon.v2.7.SP5.R) for ; Wed, 05 May 1999 15:54:36 +0100 From: Greg Frith Reply-To: greg@malthouse.demon.co.uk To: pgsql-sql@postgresql.org Subject: User and Groups Date: Wed, 5 May 1999 15:34:36 +0100 X-Mailer: KMail [version 0.7.9] Content-Type: text/plain MIME-Version: 1.0 Message-Id: <99050515531900.00820@ystrad> Content-Transfer-Encoding: 8bit X-KMail-Mark: X-MDaemon-Deliver-To: pgsql-sql@postgresql.org X-Return-Path: greg@malthouse.demon.co.uk Hi, I'm having some problems trying to get my head around how users and groups work. I have 2 groups of users: client & consultants. I create these groups as follows:- /* Group : create group consultants */ INSERT INTO pg_group VALUES ('consultants', '100'); INSERT INTO pg_group VALUES ('clients', '200'); I then create some tables and set the permissions on these tables as follows:- REVOKE ALL ON clients, clientaddr, consultants, consultantaddr, systemconstants, clients_consultants, tasks, client_extras, timesheet, schedule, invoice, invoice_items, pg_user, pg_shadow FROM GROUP clients; GRANT ALL ON clients, clientaddr, consultants, consultantaddr, systemconstants, clients_consultants, tasks, client_extras, timesheet, schedule, invoice, invoice_items TO GROUP consultants; Now I create a user:- testdb=> CREATE USER paul IN GROUP consultants; CREATE USER I login as this user and try a select on a table that should have permissions set:- testdb=> select * from consultants; NOTICE: in_group: group 100 not found ERROR: consultants: Permission denied. I can't understand this - should I insert the user id of each consultant user into grolist of pg_group where groname = consultants? TOA -- --------------------------- Greg Frith - University Of Leeds : School of Computer Studies