Permissions to schema

This is a multi-part message in MIME format.

------=_NextPart_000_002B_01CA5617.3C884300
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hi,

I have the structure on Postgre:

database: dbGlobal

schema1: sch_sist1 owner sch_sist1: john

schema2 sch_sist2 owner sch_sist2: mary


I' m using pgAdmin III.

Is there a way to avoid the mary to access the schema sch_sist1 ?

I don't want that mary see/access the schema of john and I don't want =
that john see/access the schema of mary.

Anybody has a solution.

Thanks a lot.

Eduardo


------=_NextPart_000_002B_01CA5617.3C884300
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Diso-8859-1" =
http-equiv=3DContent-Type>
<META name=3DGENERATOR content=3D"MSHTML 8.00.6001.18828">
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT size=3D2 face=3DArial>Hi,</FONT></DIV>
<DIV><FONT size=3D2 face=3DArial></FONT> </DIV>
<DIV><FONT size=3D2 face=3DArial>I have the structure on =
Postgre:</FONT></DIV>
<DIV><FONT size=3D2 face=3DArial></FONT> </DIV>
<DIV><FONT size=3D2 face=3DArial><STRONG>database</STRONG>: 
dbGlobal</FONT></DIV>
<DIV><FONT size=3D2 face=3DArial></FONT> </DIV>
<DIV><FONT size=3D2
face=3DArial><STRONG>schema1:</STRONG>      =
;  
sch_sist1     <STRONG>owner =
</STRONG>sch_sist1: 
john</FONT></DIV>
<DIV><FONT size=3D2 face=3DArial></FONT> </DIV>
<DIV><FONT size=3D2
face=3DArial><STRONG>schema2  </STRONG>    =
   
sch_sist2     <STRONG>owner
</STRONG>sch_sist2:  mary</FONT></DIV>
<DIV><FONT size=3D2 face=3DArial></FONT> </DIV>
<DIV><FONT size=3D2 face=3DArial></FONT> </DIV>
<DIV><FONT size=3D2 face=3DArial>I' m using pgAdmin III.</FONT></DIV>
<DIV><FONT size=3D2 face=3DArial></FONT> </DIV>
<DIV><FONT size=3D2 face=3DArial>Is there a way to avoid the mary to =
access the
schema sch_sist1 ?</FONT></DIV>
<DIV><FONT size=3D2 face=3DArial></FONT> </DIV>
<DIV><FONT size=3D2 face=3DArial>I don't want that mary see/access the =
schema of
john and </FONT><FONT size=3D2 face=3DArial><FONT size=3D2 =
face=3DArial>I don't want
that john see/access the schema of mary.</FONT></FONT></DIV>
<DIV><FONT size=3D2 face=3DArial></FONT> </DIV>
<DIV><FONT size=3D2 face=3DArial>Anybody has a solution.</FONT></DIV>
<DIV><FONT size=3D2 face=3DArial></FONT> </DIV>
<DIV><FONT size=3D2 face=3DArial>Thanks a lot.</FONT></DIV>
<DIV><FONT size=3D2 face=3DArial></FONT> </DIV>
<DIV><FONT size=3D2 face=3DArial>Eduardo</FONT></DIV>
<DIV><FONT size=3D2 face=3DArial></FONT> </DIV>
<DIV><FONT size=3D2 face=3DArial> </DIV></FONT></BODY></HTML>

------=_NextPart_000_002B_01CA5617.3C884300--
eduardoreis [ Mo, 26 Oktober 2009 11:35 ] [ ID #2020419 ]

Re: Permissions to schema

--000e0cd2114e0985230476d55ed5
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

2009/10/26 Eduardo S=E1 dos Reis <eduardoreis [at] pjf.mg.gov.br>

> Hi,
>
> I have the structure on Postgre:
>
> *database*: dbGlobal
>
> *schema1:* sch_sist1 *owner *sch_sist1: john
>
> *schema2 * sch_sist2 *owner *sch_sist2: mary
>
>
> I' m using pgAdmin III.
>
> Is there a way to avoid the mary to access the schema sch_sist1 ?
>
> I don't want that mary see/access the schema of john and I don't want
> that john see/access the schema of mary.
>
> Anybody has a solution.
>

http://www.postgresql.org/docs/current/static/sql-revoke.htm l

kgb=3D# create schema s1;
CREATE SCHEMA
kgb=3D# create user mary;
CREATE ROLE
kgb=3D# revoke all on schema s1 from mary;
REVOKE
kgb=3D# create table s1.testing (id int);
CREATE TABLE
kgb=3D# \c kgb mary
kgb=3D> set search_path=3Ds1;
SET
kgb=3D> \dt
No relations found.
kgb=3D> select * from s1.testing;
ERROR: permission denied for schema s1
kgb=3D>

--Scott

--000e0cd2114e0985230476d55ed5
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable


<br><br><div class=3D"gmail_quote">2009/10/26 Eduardo S=E1 dos Reis <span d=
ir=3D"ltr"><<a href=3D"mailto:eduardoreis [at] pjf.mg.gov.br">eduardoreis [at] pjf=
..mg.gov.br</a>></span><br><blockquote class=3D"gmail_quote" style=3D"bor=
der-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-=
left: 1ex;">






<div bgcolor=3D"#ffffff">
<div><font face=3D"Arial" size=3D"2">Hi,</font></div>
<div><font face=3D"Arial" size=3D"2"></font>=A0</div>
<div><font face=3D"Arial" size=3D"2">I have the structure on Postgre:</font=
></div>
<div><font face=3D"Arial" size=3D"2"></font>=A0</div>
<div><font face=3D"Arial" size=3D"2"><b>database</b>:=A0
dbGlobal</font></div>
<div><font face=3D"Arial" size=3D"2"></font>=A0</div>
<div><font face=3D"Arial" size=3D"2"><b>schema1:</b>=A0=A0=A0=A0=A0=A0=A0=
=A0
sch_sist1=A0=A0=A0=A0 <b>owner </b>sch_sist1:=A0
john</font></div>
<div><font face=3D"Arial" size=3D"2"></font>=A0</div>
<div><font face=3D"Arial" size=3D"2"><b>schema2=A0=A0</b>=A0=A0=A0=A0=A0=A0=
=A0
sch_sist2=A0=A0=A0=A0 <b>owner
</b>sch_sist2:=A0=A0mary</font></div>
<div><font face=3D"Arial" size=3D"2"></font>=A0</div>
<div><font face=3D"Arial" size=3D"2"></font>=A0</div>
<div><font face=3D"Arial" size=3D"2">I' m using pgAdmin III.</font></di=
v>
<div><font face=3D"Arial" size=3D"2"></font>=A0</div>
<div><font face=3D"Arial" size=3D"2">Is there a way to avoid the mary to ac=
cess the
schema sch_sist1 ?</font></div>
<div><font face=3D"Arial" size=3D"2"></font>=A0</div>
<div><font face=3D"Arial" size=3D"2">I don't want that mary see/access =
the schema of
john and </font><font face=3D"Arial" size=3D"2"><font face=3D"Arial" size=
=3D"2">I don't want
that=A0john see/access the schema of mary.</font></font></div>
<div><font face=3D"Arial" size=3D"2"></font>=A0</div>
<div><font face=3D"Arial" size=3D"2">Anybody has a solution.</font></div></=
div></blockquote><div><br><a href=3D"http://www.postgresql.org/docs/current=
/static/sql-revoke.html">http://www.postgresql.org/docs/curr ent/static/sql-=
revoke.html</a><br>
<br>kgb=3D# create schema s1;<br>CREATE SCHEMA<br>kgb=3D# create user mary;=
<br>CREATE ROLE<br>kgb=3D# revoke all on schema s1 from mary;<br>REVOKE<br>=
kgb=3D# create table s1.testing (id int);<br>CREATE TABLE<br>kgb=3D# \c kgb=
mary<br>
kgb=3D> set search_path=3Ds1;<br>SET<br>kgb=3D> \dt<br>No relations f=
ound.<br>kgb=3D> select * from s1.testing;<br>ERROR:=A0 permission denie=
d for schema s1<br>kgb=3D> <br><br>--Scott<br></div></div>

--000e0cd2114e0985230476d55ed5--
Scott Mead [ Mo, 26 Oktober 2009 13:04 ] [ ID #2020420 ]

Re: Permissions to schema

This is a multi-part message in MIME format.

------=_NextPart_000_0204_01CA56E2.982EEC10
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

I thing he is writing about the database objects estructure too. You can =
avoid users to access data from a schema, but you cant avoid they to =
access objects structure. As example you will see, on a table, its =
columns but not its data.

Sergio Tito
----- Original Message -----
From: Scott Mead
To: Eduardo S=E1 dos Reis
Cc: pgsql-admin [at] postgresql.org
Sent: Monday, October 26, 2009 10:04 AM
Subject: Re: [ADMIN] Permissions to schema





2009/10/26 Eduardo S=E1 dos Reis <eduardoreis [at] pjf.mg.gov.br>

Hi,

I have the structure on Postgre:

database: dbGlobal

schema1: sch_sist1 owner sch_sist1: john

schema2 sch_sist2 owner sch_sist2: mary


I' m using pgAdmin III.

Is there a way to avoid the mary to access the schema sch_sist1 ?

I don't want that mary see/access the schema of john and I don't =
want that john see/access the schema of mary.

Anybody has a solution.

http://www.postgresql.org/docs/current/static/sql-revoke.htm l

kgb=3D# create schema s1;
CREATE SCHEMA
kgb=3D# create user mary;
CREATE ROLE
kgb=3D# revoke all on schema s1 from mary;
REVOKE
kgb=3D# create table s1.testing (id int);
CREATE TABLE
kgb=3D# \c kgb mary
kgb=3D> set search_path=3Ds1;
SET
kgb=3D> \dt
No relations found.
kgb=3D> select * from s1.testing;
ERROR: permission denied for schema s1
kgb=3D>

--Scott

------=_NextPart_000_0204_01CA56E2.982EEC10
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Diso-8859-1" =
http-equiv=3DContent-Type>
<META name=3DGENERATOR content=3D"MSHTML 8.00.6001.18813">
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT size=3D2 face=3DArial>I thing he is writing about the =
database objects
estructure too. You can avoid users to access data from a schema, but =
you cant
avoid they to access objects structure. As example you will see, on a =
table, its
columns but not its data.</FONT></DIV>
<DIV><FONT size=3D2 face=3DArial></FONT> </DIV>
<DIV><FONT size=3D2 face=3DArial>Sergio Tito</FONT></DIV>
<BLOCKQUOTE
style=3D"BORDER-LEFT: #000000 2px solid; PADDING-LEFT: 5px; =
PADDING-RIGHT: 0px; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px"
dir=3Dltr>
<DIV style=3D"FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV
style=3D"FONT: 10pt arial; BACKGROUND: #e4e4e4; font-color: =
black"><B>From:</B>
<A title=3Dscott.lists [at] enterprisedb.com
href=3D"mailto:scott.lists [at] enterprisedb.com">Scott Mead</A> </DIV>
<DIV style=3D"FONT: 10pt arial"><B>To:</B> <A =
title=3Deduardoreis [at] pjf.mg.gov.br
href=3D"mailto:eduardoreis [at] pjf.mg.gov.br">Eduardo S=E1 dos Reis</A> =
</DIV>
<DIV style=3D"FONT: 10pt arial"><B>Cc:</B> <A =
title=3Dpgsql-admin [at] postgresql.org
=
href=3D"mailto:pgsql-admin [at] postgresql.org">pgsql-admin [at] postg resql.org</A>=
</DIV>
<DIV style=3D"FONT: 10pt arial"><B>Sent:</B> Monday, October 26, 2009 =
10:04
AM</DIV>
<DIV style=3D"FONT: 10pt arial"><B>Subject:</B> Re: [ADMIN] =
Permissions to
schema</DIV>
<DIV><BR></DIV><BR><BR>
<DIV class=3Dgmail_quote>2009/10/26 Eduardo S=E1 dos Reis <SPAN =
dir=3Dltr><<A
=
href=3D"mailto:eduardoreis [at] pjf.mg.gov.br">eduardoreis [at] pjf.mg .gov.br</A>&g=
t;</SPAN><BR>
<BLOCKQUOTE
style=3D"BORDER-LEFT: rgb(204,204,204) 1px solid; MARGIN: 0pt 0pt 0pt =
0.8ex; PADDING-LEFT: 1ex"
class=3Dgmail_quote>
<DIV bgcolor=3D"#ffffff">
<DIV><FONT size=3D2 face=3DArial>Hi,</FONT></DIV>
<DIV><FONT size=3D2 face=3DArial></FONT> </DIV>
<DIV><FONT size=3D2 face=3DArial>I have the structure on =
Postgre:</FONT></DIV>
<DIV><FONT size=3D2 face=3DArial></FONT> </DIV>
<DIV><FONT size=3D2 face=3DArial><B>database</B>:  =
dbGlobal</FONT></DIV>
<DIV><FONT size=3D2 face=3DArial></FONT> </DIV>
<DIV><FONT size=3D2
=
face=3DArial><B>schema1:</B>       &nb=
sp;
sch_sist1     <B>owner </B>sch_sist1: 
john</FONT></DIV>
<DIV><FONT size=3D2 face=3DArial></FONT> </DIV>
<DIV><FONT size=3D2
=
face=3DArial><B>schema2  </B>     &nbs=
p; 
sch_sist2     <B>owner
</B>sch_sist2:  mary</FONT></DIV>
<DIV><FONT size=3D2 face=3DArial></FONT> </DIV>
<DIV><FONT size=3D2 face=3DArial></FONT> </DIV>
<DIV><FONT size=3D2 face=3DArial>I' m using pgAdmin =
III.</FONT></DIV>
<DIV><FONT size=3D2 face=3DArial></FONT> </DIV>
<DIV><FONT size=3D2 face=3DArial>Is there a way to avoid the mary to =
access the
schema sch_sist1 ?</FONT></DIV>
<DIV><FONT size=3D2 face=3DArial></FONT> </DIV>
<DIV><FONT size=3D2 face=3DArial>I don't want that mary see/access =
the schema of
john and </FONT><FONT size=3D2 face=3DArial><FONT size=3D2 =
face=3DArial>I don't want
that john see/access the schema of mary.</FONT></FONT></DIV>
<DIV><FONT size=3D2 face=3DArial></FONT> </DIV>
<DIV><FONT size=3D2 face=3DArial>Anybody has a
solution.</FONT></DIV></DIV></BLOCKQUOTE>
<DIV><BR><A
=
href=3D"http://www.postgresql.org/docs/current/static/sql-re voke.html">ht=
tp://www.postgresql.org/docs/current/static/sql-revoke.html</A><BR><BR>kg=
b=3D#
create schema s1;<BR>CREATE SCHEMA<BR>kgb=3D# create user =
mary;<BR>CREATE
ROLE<BR>kgb=3D# revoke all on schema s1 from =
mary;<BR>REVOKE<BR>kgb=3D# create
table s1.testing (id int);<BR>CREATE TABLE<BR>kgb=3D# \c kgb =
mary<BR>kgb=3D>
set search_path=3Ds1;<BR>SET<BR>kgb=3D> \dt<BR>No relations =
found.<BR>kgb=3D>
select * from s1.testing;<BR>ERROR:  permission denied for schema =

s1<BR>kgb=3D> =
<BR><BR>--Scott<BR></DIV></DIV></BLOCKQUOTE></BODY></HTML>

------=_NextPart_000_0204_01CA56E2.982EEC10--
tito [ Di, 27 Oktober 2009 11:50 ] [ ID #2020566 ]
Datenbanken » gmane.comp.db.postgresql.admin » Permissions to schema

Vorheriges Thema: how to intract between databases please let me know
Nächstes Thema: pg_attribute size