pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feeddatabase permissions:how to create read only user for db
5+ messages / 3 participants
[nested] [flat]
* database permissions:how to create read only user for db
@ 2004-12-25 09:31 Alex <rootter@ngs.ru>
0 siblings, 0 replies; 5+ messages in thread
From: Alex @ 2004-12-25 09:31 UTC (permalink / raw)
To: pgsql-admin
Hello all.
Please help,
are there any way to set some (ex. deny creating tables)
privileges on database (not for databases objects)?
I want crant full access to one user (let say "adminuser"
for database "testdb") and make some others (read only)
users,
who can read only (do SELECT from "testdb" tables), but
not CREATE tables or some database objects.
As I know CRANT command allows only set privileges for
database objects but not for databases.
So, can I realize this using Postgres 7.1,
or it's not possible at all?
Thanks in advance.
/lexx/
---------------------------------------------------------
http://mobile.ngs.ru/games - Java-игры для мобильников и не только...
http://love.ngs.ru - Знакомства в Новосибирске
^ permalink raw reply [nested|flat] 5+ messages in thread
* database permissions:how to create read only user for db
@ 2004-12-25 09:54 lexx@gorodok.net
2004-12-25 16:20 ` Re: database permissions:how to create read only user for db Bruno Wolff III <bruno@wolff.to>
0 siblings, 1 reply; 5+ messages in thread
From: lexx@gorodok.net @ 2004-12-25 09:54 UTC (permalink / raw)
To: pgsql-admin
Hello all.
Please help,
are there any way to set some (ex. deny creating tables) privileges on database (not for databases objects)?
I want crant full access to one user (let say "adminuser" for database "testdb") and make some others (read only) users,
who can read only (do SELECT from "testdb" tables), but not CREATE tables or some database objects.
As I know CRANT command allows only set privileges for database objects but not for databases.
So, can I realize this using Postgres 7.1,
or it's not possible at all?
Thanks in advance.
/lexx/
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: database permissions:how to create read only user for db
2004-12-25 09:54 database permissions:how to create read only user for db lexx@gorodok.net
@ 2004-12-25 16:20 ` Bruno Wolff III <bruno@wolff.to>
2004-12-26 07:41 ` Re: database permissions:how to create read only user for db lexx@gorodok.net
0 siblings, 1 reply; 5+ messages in thread
From: Bruno Wolff III @ 2004-12-25 16:20 UTC (permalink / raw)
To: lexx@gorodok.net; +Cc: pgsql-admin
On Sat, Dec 25, 2004 at 15:54:56 +0600,
lexx@gorodok.net wrote:
> Hello all.
>
> Please help,
> are there any way to set some (ex. deny creating tables) privileges on database (not for databases objects)?
>
> I want crant full access to one user (let say "adminuser" for database "testdb") and make some others (read only) users,
> who can read only (do SELECT from "testdb" tables), but not CREATE tables or some database objects.
>
> As I know CRANT command allows only set privileges for database objects but not for databases.
You can write scripts that will set access for all existing objects in
a database. Objects created in the future will not automatically get the
same access rights. It mnay be possible to simplify granting rights by
using 'public' to give select access, if all users get at least select access.
> So, can I realize this using Postgres 7.1,
> or it's not possible at all?
You really don't want to be using 7.1. You should probably upgrade to 7.4.6,
unless this project is in the development phase, in which case using an 8.0
prelease with an eye toward using 8.0 after it is released (probably in
about two weeks) may make more sense.
7.1 isn't getting any more fixes now and there are some important bugs in
that version. You may also see significantly better performance in later
versions.
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: database permissions:how to create read only user for db
2004-12-25 09:54 database permissions:how to create read only user for db lexx@gorodok.net
2004-12-25 16:20 ` Re: database permissions:how to create read only user for db Bruno Wolff III <bruno@wolff.to>
@ 2004-12-26 07:41 ` lexx@gorodok.net
2004-12-26 17:44 ` Re: database permissions:how to create read only user for db Bruno Wolff III <bruno@wolff.to>
0 siblings, 1 reply; 5+ messages in thread
From: lexx@gorodok.net @ 2004-12-26 07:41 UTC (permalink / raw)
To: Bruno Wolff III <bruno@wolff.to>; +Cc: pgsql-admin
>> Hello all.
>>
>> Please help,
>> are there any way to set some (ex. deny creating tables) privileges on database (not for databases objects)?
>>
>> I want crant full access to one user (let say "adminuser" for database "testdb") and make some others (read only) users,
>> who can read only (do SELECT from "testdb" tables), but not CREATE tables or some database objects.
>>
>> As I know CRANT command allows only set privileges for database objects but not for databases.
BWI> You can write scripts that will set access for all existing objects in
BWI> a database. Objects created in the future will not automatically get the
BWI> same access rights. It mnay be possible to simplify granting rights by
BWI> using 'public' to give select access, if all users get at least select access.
I see what you mean, but I want set access rights to database, not
for database objects, I want to deny some users to create tables in
database, but permit read values of existing tables.
How to permit various access to tables I know, it's simlpy with `GRANT
[..] ON TABLE ..', but I don't know how to deny creating new tables,
and
I think it's not possible with PostgreSQL, because as I can
understand, GRANT don't support such ability for DATABASE.
Am I right?
will be very fine if I'm mistaken..
THanks.
/lexx/
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: database permissions:how to create read only user for db
2004-12-25 09:54 database permissions:how to create read only user for db lexx@gorodok.net
2004-12-25 16:20 ` Re: database permissions:how to create read only user for db Bruno Wolff III <bruno@wolff.to>
2004-12-26 07:41 ` Re: database permissions:how to create read only user for db lexx@gorodok.net
@ 2004-12-26 17:44 ` Bruno Wolff III <bruno@wolff.to>
0 siblings, 0 replies; 5+ messages in thread
From: Bruno Wolff III @ 2004-12-26 17:44 UTC (permalink / raw)
To: lexx@gorodok.net; +Cc: pgsql-admin
On Sun, Dec 26, 2004 at 13:41:22 +0600,
lexx@gorodok.net wrote:
>
> I see what you mean, but I want set access rights to database, not
> for database objects, I want to deny some users to create tables in
> database, but permit read values of existing tables.
There is a separate privilege for controlling creation of tables
(at least in recent versions - I am not sure about 7.1). By default
users will not have access to objects they didn't create (with a couple
of minor exceptions - see the documentation on GRANT).
> How to permit various access to tables I know, it's simlpy with `GRANT
> [..] ON TABLE ..', but I don't know how to deny creating new tables,
> and
> I think it's not possible with PostgreSQL, because as I can
> understand, GRANT don't support such ability for DATABASE.
It certainly is possible in recent versions.
^ permalink raw reply [nested|flat] 5+ messages in thread
end of thread, other threads:[~2004-12-26 17:44 UTC | newest]
Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2004-12-25 09:31 database permissions:how to create read only user for db Alex <rootter@ngs.ru>
2004-12-25 09:54 database permissions:how to create read only user for db lexx@gorodok.net
2004-12-25 16:20 ` Bruno Wolff III <bruno@wolff.to>
2004-12-26 07:41 ` lexx@gorodok.net
2004-12-26 17:44 ` Bruno Wolff III <bruno@wolff.to>
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