Skip site navigation (1) Skip section navigation (2)

grant select,update - bug or feature?

From: Eugene Karpachov <jk(at)steel(dot)orel(dot)ru>
To: pgsql-general(at)postgresql(dot)org
Cc: pgsql-admin(at)postgresql(dot)org
Subject: grant select,update - bug or feature?
Date: 2000-05-29 11:19:09
Message-ID: 20000529151909.A10272@steel.orel.ru (view raw or flat)
Thread:
Lists: pgsql-adminpgsql-general
Excuse me for my bad English.

Let us create test database as superuser:

create table master ( i integer primary key, a text);
	-- I want to protect this table from updating by 'dbuser'
	
create table slave ( j integer references master, b text);
	-- I want to enable updating this table by 'dbuser' 
	
grant select on master to dbuser;
grant select,update on slave to dbuser;

-- populating tables with sample values:
insert into master (i,a) values (1,'one');
insert into master (i,a) values (2,'two');
insert into slave (j,b) values (1,'ONE');

By now, all is ok.


Then, running psql as 'dbuser':

jk=> update slave set b='four';
ERROR:  master: Permission denied.

Why dbuser need 'update' permissions on 'master' table? I only want to
update 'slave' table.

If superuser grants update on master to dbuser, all works.

-- 
jk

Responses

pgsql-admin by date

Next:From: Werner ModenbachDate: 2000-05-29 11:23:35
Subject: pg_dumpall: Message "failed sanity check, type with oid 155265 not found"
Previous:From: R DDate: 2000-05-29 09:17:32
Subject: few securiry questions

pgsql-general by date

Next:From: Gunnar R|nningDate: 2000-05-29 11:31:34
Subject: Anonymous CVS fails
Previous:From: Stuart GrimshawDate: 2000-05-29 10:04:36
Subject: ODBC

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group