Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 14A522E011D for ; Wed, 19 Mar 2008 06:42:53 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 72555-01 for ; Wed, 19 Mar 2008 06:42:49 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.5 Received: from blu139-omc1-s6.blu139.hotmail.com (blu139-omc1-s6.blu139.hotmail.com [65.55.175.146]) by postgresql.org (Postfix) with ESMTP id 17E212E011B for ; Wed, 19 Mar 2008 06:42:48 -0300 (ADT) Received: from BLU110-W24 ([65.55.162.183]) by blu139-omc1-s6.blu139.hotmail.com with Microsoft SMTPSVC(6.0.3790.3959); Wed, 19 Mar 2008 02:42:47 -0700 Message-ID: Content-Type: multipart/alternative; boundary="_b7f46b13-b714-4e4d-844a-73b995394659_" X-Originating-IP: [59.160.193.34] From: Vishal Arora To: "Hyatt, Gordon" , Subject: Re: permissions on tables Date: Wed, 19 Mar 2008 15:12:47 +0530 Importance: Normal In-Reply-To: References: <8EA62D1B324F0A438A36E8B5F0848EB8F31F27@jdcmail1.joslin.harvard.edu> <8EA62D1B324F0A438A36E8B5F0848EB8F31F30@jdcmail1.joslin.harvard.edu> MIME-Version: 1.0 X-OriginalArrivalTime: 19 Mar 2008 09:42:47.0142 (UTC) FILETIME=[96B9B060:01C889A5] X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.088 tagged_above=0 required=5 tests=AWL=0.087, HTML_MESSAGE=0.001 X-Spam-Level: X-Archive-Number: 200803/139 X-Sequence-Number: 28622 --_b7f46b13-b714-4e4d-844a-73b995394659_ Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable While creating roles using PgAdmin, there is a check box stating "Inherits = rights from parent roles" if you do not check that option that implicitly m= eans you need NOINHERIT. If you create a role using CL, and do not mention = anything, then INHERIT is the default option. Subject: Re: [ADMIN] permissions on tablesDate: Tue, 18 Mar 2008 08:30:31 -= 0400From: Gordon.Hyatt@joslin.harvard.eduTo: pgsql-admin@postgresql.org Thanks for your response. =20 I did not explicitly use NOINHERIT (in fact I used the PgAdmin v1.6.3 New L= ogin Role and new Group Role wizard to create the user). I see that NOINHE= RIT is specified when I look at the SQL pane in PgAdmin for that login role= . =20 I=92ll remove and recreate that user allowing permissions to inherit from p= arent roles. =20 =20 It seems to me that one would usually (not always) want user roles to inher= it privileges from parent roles (including group roles). Do you know why P= gAdmin defaults to NOINHERIT on user roles? =20 =20 Please use PgAdmin Support (pgadmin-support@postgresql.org) mailing list fo= r PgAdmin related queries. =20 =20 Thanks, again. =20 Gord =20 =20 From: Vishal Arora [mailto:aroravishal22@hotmail.com] Sent: Tuesday, March = 18, 2008 4:33 AMTo: Hyatt, Gordon; pgsql-admin@postgresql.orgSubject: RE: [= ADMIN] permissions on tables =20 Subject: [ADMIN] permissions on tablesDate: Mon, 17 Mar 2008 16:26:27 -0400= From: Gordon.Hyatt@joslin.harvard.eduTo: pgsql-admin@postgresql.org Forgive me if this is not the correct list for this type of question. =20 I thought I understood PostgreSQL=92s privileges well enough, but I=92m run= ning into problems, so I must misunderstand something. =20 =20 I have a website that I=92m adding functionality to, and therefore need to = expand the database. The database already contains around 30 populated tab= les with 1 group role (group_reader) and 1 user role (user_reader). To all= existing tables, I=92d assigned PUBLIC and group_reader SELECT privilege. = =20 =20 Everything is working fine. =20 Now, I created one more group role (called group_writer) and another user r= ole (user_writer) and make sure that user_writer is a member of group_write= r. =20 Did you use NOINHERIT while creating the user role? if yes, please create i= t without this parameter. =20 I then explicitly grant group_writer SELECT privilege on all tables. (I kn= ow this is technically not necessary as PUBLIC has already been assigned SE= LECT privilege.) =20 I created (tbl_batch) and deliberately decided to not grant PUBLIC access t= o this table. Instead, I granted group_writer SELECT, INSERT, UPDATE, and = DELETE privileges to this table. Looking at the ACL list for this table co= nfirms this. =20 When I attempt to access this table as user_writer, I=92m denied access. I= =92m access this through Tomcat and verifying the connected user as user_wr= iter. =20 I shouldn=92t have to grant the PUBLIC group full access to this table as = well, should I? =20 From what I understand of the manual, a user=92s privileges are the SUM of = the privileges of all groups of which that user is a member. Therefore, us= er_writer=92s privileges should be {SELECT, INSERT, UPDATE, DELETE} from gr= oup_writer plus {} from PUBLIC, which should yield {SELECT, INSERT, UPDATE,= DELETE}. =20 =20 BTW, I=92m running 8.2.6 on WinXP x64 SP2. =20 =20 Thanks, =20 Gord =20 =20 Detailed profiles 4 marriage! Only at Shaadi.com Try it! Post free auto ads on Yello Classifieds now! Try it now!=20 _________________________________________________________________ Tried the new MSN Messenger? It=92s cool! Download now. http://messenger.msn.com/Download/Default.aspx?mkt=3Den-in= --_b7f46b13-b714-4e4d-844a-73b995394659_ Content-Type: text/html; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable

While creating roles using PgAdmin, there= is a check box stating "Inherits rights from parent roles" if you do not c= heck that option that implicitly means you need NOINHERIT. If you create a = role using CL, and do not mention anything, then INHERIT is the default opt= ion.


Subject: Re: [ADMIN] permissions on tables
Date: Tue, 18 Mar 2008 08:30:= 31 -0400
From: Gordon.Hyatt@joslin.harvard.edu
To: pgsql-admin@postgr= esql.org

Thanks for your r= esponse.

 

I did not explici= tly use NOINHERIT (in fact I used the PgAdmin v1.6.3 New Login Role and new= Group Role wizard to create the user).  I see that NOINHERIT is speci= fied when I look at the SQL pane in PgAdmin for that login role.

 

I=92ll remove and= recreate that user allowing permissions to inherit from parent roles. = ;

 

It seems to me th= at one would usually (not always) want user roles to inherit privileges fro= m parent roles (including group roles).  Do you know why PgAdmin defau= lts to NOINHERIT on user roles? 

 

Please use PgAdmin Support = (pgadmin-support@postgresql.org) maili= ng list for PgAdmin related queries.



 

&nb= sp;

Thanks, again.

 

Gord

 

 


From:= Vishal Arora [mailto:aroravishal22@hotmail.com]
Sent: Tuesday, March 18, 2008 4:33 AM<= BR>To: Hyatt, Gordon; pgsql= -admin@postgresql.org
Subject: RE: [ADMIN] permissions on tables

 




Subject: [A= DMIN] permissions on tables
Date: Mon, 17 Mar 2008 16:26:27 -0400
Fro= m: Gordon.Hyatt@joslin.harvard.edu
To: pgsql-admin@postgresql.org
=

Forgive me if this is not the correct list = for this type of question.

 

I thought I understood PostgreSQL=92s privi= leges well enough, but I=92m running into problems, so I must misunderstand= something. 

 

I have a website that I=92m adding function= ality to, and therefore need to expand the database.  The database alr= eady contains around 30 populated tables with 1 group role (group_reader) a= nd 1 user role (user_reader).  To all existing tables, I=92d assigned = PUBLIC and group_reader SELECT privilege. 

 

Everything is working fine.

 

Now, I created one more group role (called = group_writer) and another user role (user_writer) and make sure that user_w= riter is a member of group_writer.

 

Did you use NOINH= ERIT while creating the user role? if yes, please create it without th= is parameter.

 

I then explicitly grant group_writer SELECT= privilege on all tables.  (I know this is technically not necessary a= s PUBLIC has already been assigned SELECT privilege.)<= /SPAN>

 

I created (tbl_batch) and deliberately deci= ded to not grant PUBLIC access to this table.  Instead, I granted grou= p_writer SELECT, INSERT, UPDATE, and DELETE privileges to this table. = Looking at the ACL list for this table confirms this.=

 

When I attempt to access this table as user= _writer, I=92m denied access.  I=92m access this through Tomcat and ve= rifying the connected user as user_writer.

 

I shouldn=92t have to grant the PUBLIC &nbs= p;group full access to this table as well, should I?

 

From what I understand of the manual, a use= r=92s privileges are the SUM of the privileges of all groups of which that = user is a member.  Therefore, user_writer=92s privileges should be {SE= LECT, INSERT, UPDATE, DELETE} from group_writer plus {} from PUBLIC, which = should yield {SELECT, INSERT, UPDATE, DELETE}.<= /FONT>

 

 

BTW, I=92m running 8.2.6 on WinXP x64 SP2.<= /SPAN>

 

 

Thanks,<= /P>

 

Gord

 

 


Detailed profiles 4 marriage! Only at Sha= adi.com Try it!



Post free auto ads on Yello Classifieds now! Try it now!

Live the life in style with MSN Lifestyle. Check out! Try it now!<= /body> = --_b7f46b13-b714-4e4d-844a-73b995394659_--