pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedGrants
6+ messages / 4 participants
[nested] [flat]
* Grants
@ 2006-11-30 19:41 Ezequias Rodrigues da Rocha <ezequias.rocha@gmail.com>
2006-11-30 20:24 ` Re: [SQL] Grants imad <immaad@gmail.com>
0 siblings, 1 reply; 6+ messages in thread
From: Ezequias Rodrigues da Rocha @ 2006-11-30 19:41 UTC (permalink / raw)
To: Pgadmin-Support <pgadmin-support@postgresql.org>; pgsql-sql
Hi list,
I am having problem with grants and users on PostgreSQL.
I am using pgAdmin to connect like other user to test my permissions.
As the owner of the database I have criated two roles:
administrators (cannot connect)
ezequias (can connect)
I give permissions to a table I have:
GRANT SELECT, UPDATE, INSERT ON TABLE base.table1 TO administrators;
My user:
CREATE ROLE ezequias LOGIN
NOSUPERUSER NOINHERIT NOCREATEDB NOCREATEROLE;
GRANT administradores TO ezequias;
My group
CREATE ROLE administradores
NOSUPERUSER NOINHERIT NOCREATEDB NOCREATEROLE;
When I try to access the table base.table1 with ezequias login the
pgAdmin reports:
(see attached image)
Could someone tell me what I did wrong ?
Ezequias
Attachments:
error.JPG (image/jpeg, 9.0K) download
view image
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: [SQL] Grants
2006-11-30 19:41 Grants Ezequias Rodrigues da Rocha <ezequias.rocha@gmail.com>
@ 2006-11-30 20:24 ` imad <immaad@gmail.com>
2006-12-01 14:03 ` Re: [SQL] Grants Ezequias Rodrigues da Rocha <ezequias.rocha@gmail.com>
0 siblings, 1 reply; 6+ messages in thread
From: imad @ 2006-11-30 20:24 UTC (permalink / raw)
To: Ezequias Rodrigues da Rocha <ezequias.rocha@gmail.com>; +Cc: Pgadmin-Support <pgadmin-support@postgresql.org>; pgsql-sql
You did not grant access privileges to schema.
Also GRANT administrators on the base schema as you did for the table.
--Imad
www.EnterpriseDB.com
On 12/1/06, Ezequias Rodrigues da Rocha <ezequias.rocha@gmail.com> wrote:
> Hi list,
>
> I am having problem with grants and users on PostgreSQL.
>
> I am using pgAdmin to connect like other user to test my permissions.
>
> As the owner of the database I have criated two roles:
>
> administrators (cannot connect)
> ezequias (can connect)
>
> I give permissions to a table I have:
> GRANT SELECT, UPDATE, INSERT ON TABLE base.table1 TO administrators;
>
>
> My user:
> CREATE ROLE ezequias LOGIN
> NOSUPERUSER NOINHERIT NOCREATEDB NOCREATEROLE;
> GRANT administradores TO ezequias;
>
> My group
> CREATE ROLE administradores
> NOSUPERUSER NOINHERIT NOCREATEDB NOCREATEROLE;
>
> When I try to access the table base.table1 with ezequias login the
> pgAdmin reports:
> (see attached image)
>
> Could someone tell me what I did wrong ?
> Ezequias
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: don't forget to increase your free space map settings
>
>
>
>
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: [SQL] Grants
2006-11-30 19:41 Grants Ezequias Rodrigues da Rocha <ezequias.rocha@gmail.com>
2006-11-30 20:24 ` Re: [SQL] Grants imad <immaad@gmail.com>
@ 2006-12-01 14:03 ` Ezequias Rodrigues da Rocha <ezequias.rocha@gmail.com>
2006-12-01 15:42 ` Re: [SQL] Grants Adrian Klaver <aklaver@comcast.net>
2006-12-02 20:31 ` Re: [SQL] Grants Melvin Davidson <mdavidson@cctus.com>
0 siblings, 2 replies; 6+ messages in thread
From: Ezequias Rodrigues da Rocha @ 2006-12-01 14:03 UTC (permalink / raw)
To: imad <immaad@gmail.com>; +Cc: Pgadmin-Support <pgadmin-support@postgresql.org>; pgsql-sql
####Schema grants####
CREATE SCHEMA base
AUTHORIZATION root;
GRANT ALL ON SCHEMA base TO root;
GRANT USAGE ON SCHEMA base TO administrators;
####Table grants####
GRANT ALL ON TABLE base."local" TO root;
GRANT SELECT, UPDATE, INSERT ON TABLE base."local" TO administrators;
Still the same problem. :(
2006/11/30, imad <immaad@gmail.com>:
> You did not grant access privileges to schema.
> Also GRANT administrators on the base schema as you did for the table.
>
> --Imad
> www.EnterpriseDB.com
>
>
> On 12/1/06, Ezequias Rodrigues da Rocha <ezequias.rocha@gmail.com> wrote:
> > Hi list,
> >
> > I am having problem with grants and users on PostgreSQL.
> >
> > I am using pgAdmin to connect like other user to test my permissions.
> >
> > As the owner of the database I have criated two roles:
> >
> > administrators (cannot connect)
> > ezequias (can connect)
> >
> > I give permissions to a table I have:
> > GRANT SELECT, UPDATE, INSERT ON TABLE base.table1 TO administrators;
> >
> >
> > My user:
> > CREATE ROLE ezequias LOGIN
> > NOSUPERUSER NOINHERIT NOCREATEDB NOCREATEROLE;
> > GRANT administradores TO ezequias;
> >
> > My group
> > CREATE ROLE administradores
> > NOSUPERUSER NOINHERIT NOCREATEDB NOCREATEROLE;
> >
> > When I try to access the table base.table1 with ezequias login the
> > pgAdmin reports:
> > (see attached image)
> >
> > Could someone tell me what I did wrong ?
> > Ezequias
> >
> >
> >
> > ---------------------------(end of broadcast)---------------------------
> > TIP 5: don't forget to increase your free space map settings
> >
> >
> >
> >
>
--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Atenciosamente (Sincerely)
Ezequias Rodrigues da Rocha
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
A pior das democracias ainda é melhor do que a melhor das ditaduras
The worst of democracies is still better than the better of dictatorships
http://ezequiasrocha.blogspot.com/
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: [SQL] Grants
2006-11-30 19:41 Grants Ezequias Rodrigues da Rocha <ezequias.rocha@gmail.com>
2006-11-30 20:24 ` Re: [SQL] Grants imad <immaad@gmail.com>
2006-12-01 14:03 ` Re: [SQL] Grants Ezequias Rodrigues da Rocha <ezequias.rocha@gmail.com>
@ 2006-12-01 15:42 ` Adrian Klaver <aklaver@comcast.net>
1 sibling, 0 replies; 6+ messages in thread
From: Adrian Klaver @ 2006-12-01 15:42 UTC (permalink / raw)
To: pgsql-sql; +Cc: Ezequias Rodrigues da Rocha <ezequias.rocha@gmail.com>; imad <immaad@gmail.com>; Pgadmin-Support <pgadmin-support@postgresql.org>
On Friday 01 December 2006 06:03 am, Ezequias Rodrigues da Rocha wrote:
>
> 2006/11/30, imad <immaad@gmail.com>:
> > You did not grant access privileges to schema.
> > Also GRANT administrators on the base schema as you did for the table.
> >
> > --Imad
> > www.EnterpriseDB.com
> >
> > On 12/1/06, Ezequias Rodrigues da Rocha <ezequias.rocha@gmail.com> wrote:
> > > Hi list,
> > >
> > > I am having problem with grants and users on PostgreSQL.
> > >
> > > I am using pgAdmin to connect like other user to test my permissions.
> > >
> > > As the owner of the database I have criated two roles:
> > >
> > > administrators (cannot connect)
> > > ezequias (can connect)
> > >
> > > I give permissions to a table I have:
> > > GRANT SELECT, UPDATE, INSERT ON TABLE base.table1 TO administrators;
> > >
> > >
> > > My user:
> > > CREATE ROLE ezequias LOGIN
> > > NOSUPERUSER NOINHERIT NOCREATEDB NOCREATEROLE;
> > > GRANT administradores TO ezequias;
> > >
> > > My group
> > > CREATE ROLE administradores
> > > NOSUPERUSER NOINHERIT NOCREATEDB NOCREATEROLE;
> > >
> > > When I try to access the table base.table1 with ezequias login the
> > > pgAdmin reports:
> > > (see attached image)
> > >
> > > Could someone tell me what I did wrong ?
> > > Ezequias
> > >
> > >
> > >
> > > ---------------------------(end of
> > > broadcast)--------------------------- TIP 5: don't forget to increase
> > > your free space map settings
> ####Schema grants####
>
> CREATE SCHEMA base
> AUTHORIZATION root;
> GRANT ALL ON SCHEMA base TO root;
> GRANT USAGE ON SCHEMA base TO administrators;
>
> ####Table grants####
> GRANT ALL ON TABLE base."local" TO root;
> GRANT SELECT, UPDATE, INSERT ON TABLE base."local" TO administrators;
>
> Still the same problem. :(
Two things I see.
The first may only be a translation artifact. You have CREATE ROLE
administradores and then GRANT to administrators on the table.
Second in the CREATE ROLE ezequias you have NOINHERIT. This means ezequias
does not automatically assume the privileges of the ROLES it belongs to. To
acquire the privileges you have to do a SET ROLE administrators at the
connection.
--
Adrian Klaver
aklaver@comcast.net
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: [SQL] Grants
2006-11-30 19:41 Grants Ezequias Rodrigues da Rocha <ezequias.rocha@gmail.com>
2006-11-30 20:24 ` Re: [SQL] Grants imad <immaad@gmail.com>
2006-12-01 14:03 ` Re: [SQL] Grants Ezequias Rodrigues da Rocha <ezequias.rocha@gmail.com>
@ 2006-12-02 20:31 ` Melvin Davidson <mdavidson@cctus.com>
2006-12-04 17:08 ` Re: [SQL] Grants Ezequias Rodrigues da Rocha <ezequias.rocha@gmail.com>
1 sibling, 1 reply; 6+ messages in thread
From: Melvin Davidson @ 2006-12-02 20:31 UTC (permalink / raw)
To: Ezequias Rodrigues da Rocha <ezequias.rocha@gmail.com>; imad <immaad@gmail.com>; +Cc: Pgadmin-Support <pgadmin-support@postgresql.org>
Look at your script.
Your syntax is backward.
> GRANT administradores TO ezequias;
Also, you must create the administradores role _BEPORE_ you grant to it/
It should be:
CREATE ROLE administradores
NOSUPERUSER NOINHERIT NOCREATEDB NOCREATEROLE;
GRANT ezequias TO administradores ;
That should fix the problem.
-----Original Message-----
From: pgadmin-support-owner@postgresql.org [mailto:pgadmin-support-owner@postgresql.org] On Behalf Of Ezequias Rodrigues da Rocha
Sent: Friday, December 01, 2006 7:04 AM
To: imad
Cc: Pgadmin-Support; pgsql-sql@postgresql.org
Subject: Re: [pgadmin-support] [SQL] Grants
####Schema grants####
CREATE SCHEMA base
AUTHORIZATION root;
GRANT ALL ON SCHEMA base TO root;
GRANT USAGE ON SCHEMA base TO administrators;
####Table grants####
GRANT ALL ON TABLE base."local" TO root; GRANT SELECT, UPDATE, INSERT ON TABLE base."local" TO administrators;
Still the same problem. :(
2006/11/30, imad <immaad@gmail.com>:
> You did not grant access privileges to schema.
> Also GRANT administrators on the base schema as you did for the table.
>
> --Imad
> www.EnterpriseDB.com
>
>
> On 12/1/06, Ezequias Rodrigues da Rocha <ezequias.rocha@gmail.com> wrote:
> > Hi list,
> >
> > I am having problem with grants and users on PostgreSQL.
> >
> > I am using pgAdmin to connect like other user to test my permissions.
> >
> > As the owner of the database I have criated two roles:
> >
> > administrators (cannot connect)
> > ezequias (can connect)
> >
> > I give permissions to a table I have:
> > GRANT SELECT, UPDATE, INSERT ON TABLE base.table1 TO administrators;
> >
> >
> > My user:
> > CREATE ROLE ezequias LOGIN
> > NOSUPERUSER NOINHERIT NOCREATEDB NOCREATEROLE; GRANT
> > administradores TO ezequias;
> >
> > My group
> >
> > When I try to access the table base.table1 with ezequias login the
> > pgAdmin reports:
> > (see attached image)
> >
> > Could someone tell me what I did wrong ?
> > Ezequias
> >
> >
> >
> > ---------------------------(end of
> > broadcast)---------------------------
> > TIP 5: don't forget to increase your free space map settings
> >
> >
> >
> >
>
--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Atenciosamente (Sincerely)
Ezequias Rodrigues da Rocha
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
A pior das democracias ainda é melhor do que a melhor das ditaduras The worst of democracies is still better than the better of dictatorships http://ezequiasrocha.blogspot.com/
---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?
http://www.postgresql.org/docs/faq
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: [SQL] Grants
2006-11-30 19:41 Grants Ezequias Rodrigues da Rocha <ezequias.rocha@gmail.com>
2006-11-30 20:24 ` Re: [SQL] Grants imad <immaad@gmail.com>
2006-12-01 14:03 ` Re: [SQL] Grants Ezequias Rodrigues da Rocha <ezequias.rocha@gmail.com>
2006-12-02 20:31 ` Re: [SQL] Grants Melvin Davidson <mdavidson@cctus.com>
@ 2006-12-04 17:08 ` Ezequias Rodrigues da Rocha <ezequias.rocha@gmail.com>
0 siblings, 0 replies; 6+ messages in thread
From: Ezequias Rodrigues da Rocha @ 2006-12-04 17:08 UTC (permalink / raw)
To: Melvin Davidson <mdavidson@cctus.com>; +Cc: imad <immaad@gmail.com>; Pgadmin-Support <pgadmin-support@postgresql.org>
Thank you so much. Now everything is ok.
My real best regards
Ezequias Rodrigues da Rocha
2006/12/2, Melvin Davidson <mdavidson@cctus.com>:
> Look at your script.
>
> Your syntax is backward.
> > GRANT administradores TO ezequias;
>
>
> Also, you must create the administradores role _BEPORE_ you grant to it/
> It should be:
> CREATE ROLE administradores
> NOSUPERUSER NOINHERIT NOCREATEDB NOCREATEROLE;
>
> GRANT ezequias TO administradores ;
>
> That should fix the problem.
>
>
> -----Original Message-----
> From: pgadmin-support-owner@postgresql.org [mailto:pgadmin-support-owner@postgresql.org] On Behalf Of Ezequias Rodrigues da Rocha
> Sent: Friday, December 01, 2006 7:04 AM
> To: imad
> Cc: Pgadmin-Support; pgsql-sql@postgresql.org
> Subject: Re: [pgadmin-support] [SQL] Grants
>
> ####Schema grants####
>
> CREATE SCHEMA base
> AUTHORIZATION root;
> GRANT ALL ON SCHEMA base TO root;
> GRANT USAGE ON SCHEMA base TO administrators;
>
> ####Table grants####
> GRANT ALL ON TABLE base."local" TO root; GRANT SELECT, UPDATE, INSERT ON TABLE base."local" TO administrators;
>
> Still the same problem. :(
>
> 2006/11/30, imad <immaad@gmail.com>:
> > You did not grant access privileges to schema.
> > Also GRANT administrators on the base schema as you did for the table.
> >
> > --Imad
> > www.EnterpriseDB.com
> >
> >
> > On 12/1/06, Ezequias Rodrigues da Rocha <ezequias.rocha@gmail.com> wrote:
> > > Hi list,
> > >
> > > I am having problem with grants and users on PostgreSQL.
> > >
> > > I am using pgAdmin to connect like other user to test my permissions.
> > >
> > > As the owner of the database I have criated two roles:
> > >
> > > administrators (cannot connect)
> > > ezequias (can connect)
> > >
> > > I give permissions to a table I have:
> > > GRANT SELECT, UPDATE, INSERT ON TABLE base.table1 TO administrators;
> > >
> > >
> > > My user:
> > > CREATE ROLE ezequias LOGIN
> > > NOSUPERUSER NOINHERIT NOCREATEDB NOCREATEROLE; GRANT
> > > administradores TO ezequias;
> > >
> > > My group
> > >
> > > When I try to access the table base.table1 with ezequias login the
> > > pgAdmin reports:
> > > (see attached image)
> > >
> > > Could someone tell me what I did wrong ?
> > > Ezequias
> > >
> > >
> > >
> > > ---------------------------(end of
> > > broadcast)---------------------------
> > > TIP 5: don't forget to increase your free space map settings
> > >
> > >
> > >
> > >
> >
>
>
> --
> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
> Atenciosamente (Sincerely)
> Ezequias Rodrigues da Rocha
> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
> A pior das democracias ainda é melhor do que a melhor das ditaduras The worst of democracies is still better than the better of dictatorships http://ezequiasrocha.blogspot.com/
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/docs/faq
>
--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Atenciosamente (Sincerely)
Ezequias Rodrigues da Rocha
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
A pior das democracias ainda é melhor do que a melhor das ditaduras
The worst of democracies is still better than the better of dictatorships
http://ezequiasrocha.blogspot.com/
^ permalink raw reply [nested|flat] 6+ messages in thread
end of thread, other threads:[~2006-12-04 17:08 UTC | newest]
Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2006-11-30 19:41 Grants Ezequias Rodrigues da Rocha <ezequias.rocha@gmail.com>
2006-11-30 20:24 ` imad <immaad@gmail.com>
2006-12-01 14:03 ` Ezequias Rodrigues da Rocha <ezequias.rocha@gmail.com>
2006-12-01 15:42 ` Adrian Klaver <aklaver@comcast.net>
2006-12-02 20:31 ` Melvin Davidson <mdavidson@cctus.com>
2006-12-04 17:08 ` Ezequias Rodrigues da Rocha <ezequias.rocha@gmail.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox