RE: Granting of permissions on tables

From: "Saltsgaver, Scott" <scottsa(at)aiinet(dot)com>
To: "'pgsql-sql(at)postgresql(dot)org'" <pgsql-sql(at)postgresql(dot)org>
Subject: RE: Granting of permissions on tables
Date: 2000-10-06 13:25:15
Message-ID: 7283DE19D141D111AD0E00A0C95B195503A59E74@mail2.aiinet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

After I ran into this condition, the first thing I tried was to grant
permissions back to myself. PostgreSQL shot me down with a permission
denied error. So I had to log is as the superuser and then grant
permissions to myself.

Thanks for everyone's help. So would an exceptable workaround be to grant
permissions to yourself first and then to all other users?

Scott

-----Original Message-----
From: Tom Lane [mailto:tgl(at)sss(dot)pgh(dot)pa(dot)us]
Sent: Thursday, October 05, 2000 5:38 PM
To: Saltsgaver, Scott
Cc: 'pgsql-sql(at)postgresql(dot)org'
Subject: Re: [SQL] Granting of permissions on tables

"Saltsgaver, Scott" <scottsa(at)aiinet(dot)com> writes:
> Is this a bug or desired behavior? I would imagine since I owned the
tables
> and then granted permissions to another user, I wouldn't lose my
> permissions.

It's a bug, or at least a misfeature. As long as you haven't done any
explicit grants or revokes, 7.0 uses an implicit access control list
that grants all privileges to the owner and none to anyone else.
However, the moment you do any explicit grant/revoke, that implicit
ACL entry for the owner isn't used anymore. You have to explicitly
grant rights to yourself again :-(.

You don't need superuser help to do this, you just have to do
GRANT ALL ON table TO yourself
as the table owner. But it's stupid to have to do that when it's
supposed to be the default condition. Fixed for 7.1.

regards, tom lane

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Tom Lane 2000-10-06 15:07:05 Re: Granting of permissions on tables
Previous Message Tom Lane 2000-10-06 05:01:47 Re: Counting bool flags in a complex query