Thread

  1. grant oddity

    Bruno Wolff III <bruno@wolff.to> — 2000-12-14T16:50:48Z

    ============================================================================
                            POSTGRESQL BUG REPORT TEMPLATE
    ============================================================================
    
    
    Your name		:	Bruno Wolff III
    Your email address	:	bruno@wolff.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@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@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.
    
    
  2. Re: grant oddity

    Tom Lane <tgl@sss.pgh.pa.us> — 2000-12-15T17:47:54Z

    Bruno Wolff III <bruno@wolff.to> writes:
    > 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.
    
    Right.  This is a known bug --- it's fixed in 7.1beta1.
    
    			regards, tom lane