Privileges question

Started by James Moeabout 21 years ago3 messagesgeneral
Jump to latest
#1James Moe
jimoe@sohnen-moe.com

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello,
~ I created a schema, database, tables, users and a user group.

create user sma_user password 'xxxxx';
create group sma_user_group;
alter group sma_user_group add user sma_user;

create table sma_apps.ordr_dat ( ... );
grant select,delete,insert,update on sma_apps.ordr_dat to group
sma_user_group;

~ Access privileges for database "smadb1"
~ Schema | Name | Type | Access privileges
-
----------+----------+-------+---------------------------------------------------------------------
~ sma_apps | ordr_dat | table | {sma_admin=arwdRxt/sma_admin,"group
sma_user_group=arwd/sma_admin"}

~ When logged in as sma_user, it is denied access to the schema:
ERROR: permission denied for schema sma_apps

What am I missing? How do I provide access to a schema?

- --
jimoe at sohnen-moe dot com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (OS/2)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFCEPUUzTcr8Prq0ZMRAvU/AJ90kwdpxNYGgHdzBA7A2uPFo4FcNwCdFeGz
Q7Dte87qrtET8yoI7uZ9VD0=
=0sLa
-----END PGP SIGNATURE-----

#2Michael Fuhr
mike@fuhr.org
In reply to: James Moe (#1)
Re: Privileges question

On Mon, Feb 14, 2005 at 11:59:33AM -0700, James Moe wrote:

When logged in as sma_user, it is denied access to the schema:
ERROR: permission denied for schema sma_apps

See "Schemas and Privileges" in the documentation, as well as the
documentation for GRANT:

http://www.postgresql.org/docs/8.0/static/ddl-schemas.html#DDL-SCHEMAS-PRIV
http://www.postgresql.org/docs/8.0/static/sql-grant.html

--
Michael Fuhr
http://www.fuhr.org/~mfuhr/

#3Gregory S. Williamson
gsw@globexplorer.com
In reply to: Michael Fuhr (#2)
Re: Privileges question

James --

I am not sure if anyone answered this yet, but you might try:
GRANT USAGE ON SCHEMA sma_apps TO sma_user;
as the same user as createdthe schema ...

HTH,

Greg Williamson
DBA
GlobeXplorer LLC
-----Original Message-----
From: James Moe [mailto:jimoe@sohnen-moe.com]
Sent: Mon 2/14/2005 10:59 AM
To: pgsql-general@postgresql.org
Cc:
Subject: [GENERAL] Privileges question
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello,
~ I created a schema, database, tables, users and a user group.

create user sma_user password 'xxxxx';
create group sma_user_group;
alter group sma_user_group add user sma_user;

create table sma_apps.ordr_dat ( ... );
grant select,delete,insert,update on sma_apps.ordr_dat to group
sma_user_group;

~ Access privileges for database "smadb1"
~ Schema | Name | Type | Access privileges
-
----------+----------+-------+---------------------------------------------------------------------
~ sma_apps | ordr_dat | table | {sma_admin=arwdRxt/sma_admin,"group
sma_user_group=arwd/sma_admin"}

~ When logged in as sma_user, it is denied access to the schema:
ERROR: permission denied for schema sma_apps

What am I missing? How do I provide access to a schema?

- --
jimoe at sohnen-moe dot com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (OS/2)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFCEPUUzTcr8Prq0ZMRAvU/AJ90kwdpxNYGgHdzBA7A2uPFo4FcNwCdFeGz
Q7Dte87qrtET8yoI7uZ9VD0=
=0sLa
-----END PGP SIGNATURE-----

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq

!DSPAM:4210f76918377043564807!