Permissions issue?

From: Christopher Murtagh <christopher(dot)murtagh(at)mcgill(dot)ca>
To: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Permissions issue?
Date: 2003-12-17 18:20:50
Message-ID: 1071685250.6551.29.camel@brahma.wcg.mcgill.ca
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Greetings,

I'm trying to create a user without create privileges and I don't seem
to be able to do it. I could be clueless, but after my revoke
statements, the new user still seems to be able to create dbs, and then
have full privileges on them. Am I missing something?

Below is the output of my terminal window where I create a new user
(which doesn't have select privileges), but even after revoke can still
create new tables.

Any info would be much appreciated, I need to give someone select
access to a view and I can't do it if they can still create dbs.

Cheers,

Chris

chris(at)torvalds chris]$ createuser newuser
Shall the new user be allowed to create databases? (y/n) n
Shall the new user be allowed to create more new users? (y/n) n
CREATE USER
[chris(at)torvalds chris]$ psql a -U newuser
Welcome to psql 7.4RC2, the PostgreSQL interactive terminal.

Type: \copyright for distribution terms
\h for help with SQL commands
\? for help on internal slash commands
\g or terminate with semicolon to execute query
\q to quit

a=> select * from ind;
ERROR: permission denied for relation ind
a=> \q
[chris(at)torvalds chris]$ psql
Welcome to psql 7.4RC2, the PostgreSQL interactive terminal.

Type: \copyright for distribution terms
\h for help with SQL commands
\? for help on internal slash commands
\g or terminate with semicolon to execute query
\q to quit

chris=# revoke all on database a from newuser;
REVOKE
chris=# revoke create on database a from newuser;
REVOKE
chris=# \q
[chris(at)torvalds chris]$ psql a -U newuser
Welcome to psql 7.4RC2, the PostgreSQL interactive terminal.

Type: \copyright for distribution terms
\h for help with SQL commands
\? for help on internal slash commands
\g or terminate with semicolon to execute query
\q to quit

a=> create table foo(bar integer);
CREATE TABLE
a=> insert into foo values(1);
INSERT 6273211 1
a=> select * from foo;
bar
-----
1
(1 row)

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Sai Hertz And Control Systems 2003-12-17 18:30:57 Re: Excel, OpenOffice and Postgres
Previous Message Don Isgitt 2003-12-17 18:17:57 copy command problem