schema-qualified permission problem
schema-qualified permission problem
От:
Charlie Toohey <ctoohey@pacbell.net>
Дата:
Why can't my primary user (ttvuser) access tables (owned by owneruser) for
which they've been granted access? I can describe the table, but can't
read it.
===================
Here's what I'm getting:
ttvdev=> \c - owneruser
Password:
You are now connected as new user owneruser.
ttvdev=> \d List of relationsSchema | Name | Type | Owner
--------+------------------------+----------+--------owneruser | users | table | owneruser
ttvdev=> select count(*) from owneruser.users;count
------- 0
(1 row)
ttvdev=> \dp Access privileges for database "ttvdev"Schema | Table | Access privileges
--------+------------------------+---------------------------------owneruser | users | {=,owneruser=arwdRxt,ttvuser=arwd}
ttvdev=> \c - postgres
Password:
You are now connected as new user postgres.
ttvdev=# select count(*) from owneruser.users;count
------- 0
(1 row)
ttvdev=> \c - ttvuser
Password:
You are now connected as new user ttvuser.
ttvdev=> \d owneruser.users Table "owneruser.users" Column | Type | Modifiers
--------------------+-----------------------------+-----------user_id | integer | not nullinitials | character varying(3) | not nullusername | character varying(18) | not nullpassword | character varying(25) | not nullemail | character varying(256) | not nullauthenticationdate | timestamp without time zone | creationdate | timestamp without time zone | modifydate | timestamp without time zone | userlastmodified | timestamp without time zone | adminlastmodified | timestamp without time zone | autologin | character varying(1) | active | character varying(1) | passhint | character varying(25) | firstname | character varying(40) | lastname | character varying(40) | sex | character varying(6) | department | character varying(40) | manager_flag | character varying(1) | phone | character varying(50) |
Indexes: pk_users primary key btree (user_id)
ttvdev=> select count(*) from owneruser.users;
ERROR: owneruser: permission denied
Re: schema-qualified permission problem
От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
Charlie Toohey writes: > Why can't my primary user (ttvuser) access tables (owned by owneruser) for > which they've been granted access? I can describe the table, but can't > read it. > ttvdev=> select count(*) from owneruser.users; > ERROR: owneruser: permission denied You didn't grant USAGE permission on the owneruser schema. regards, tom lane