grant oddity

From: Bruno Wolff III <bruno(at)wolff(dot)to>
To: pgsql-bugs(at)postgresql(dot)org
Subject: grant oddity
Date: 2000-12-14 16:50:48
Message-ID: 20001214105048.A1466@wolff.to
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs


============================================================================
POSTGRESQL BUG REPORT TEMPLATE
============================================================================

Your name : Bruno Wolff III
Your email address : bruno(at)wolff(dot)to

System Configuration
---------------------
Architecture (example: Intel Pentium) : Intel Pentium

Operating System (example: Linux 2.0.26 ELF) : Linux 2.2.16-4 (Redhat)

PostgreSQL version (example: PostgreSQL-7.0): PostgreSQL-7.0.3

Compiler used (example: gcc 2.8.0) : N/A installed from RPM

Please enter a FULL description of your problem:
------------------------------------------------

That documentation on access to tables seems to be at odds with what happens.
How grant affects access isn't very intuitive. I am not sure if the handling
of access to tables or the documentation is broken.

The problem is that when access is granted explicitly, the implicit access
by the owner of the object (at least for select) is lost. The work around
is to also give explicit access to the owner.

Please describe a way to repeat the problem. Please try to provide a
concise reproducible example, if at all possible:
----------------------------------------------------------------------
Script started on Thu Dec 14 10:35:27 2000
[bruno(at)wolff bruno]$ psql area
Welcome to psql, the PostgreSQL interactive terminal.

Type: \copyright for distribution terms
\h for help with SQL commands
\? for help on internal slash commands
\g or terminate with semicolon to execute query
\q to quit

area=> create table test (col1 int);
CREATE
area=> select * from test;
col1
------
(0 rows)

area=> grant select on test to nobody;
CHANGE
area=> select * from test;
ERROR: test: Permission denied.
area=> drop table test;
DROP
area=> \q
[bruno(at)wolff bruno]$ exit
exit

Script done on Thu Dec 14 10:38:05 2000

If you know how this problem might be fixed, list the solution below:
---------------------------------------------------------------------

I don't know how to fix this; I just have the workaround mentioned above.

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Agboh, Charles 2000-12-14 17:16:56 compilation error on linux mandrake
Previous Message Kovacs Zoltan Sandor 2000-12-14 11:44:47 to_char() causes backend to close connection