Permissions issue? - Mailing list pgsql-general

From Christopher Murtagh
Subject Permissions issue?
Date
Msg-id 1071685250.6551.29.camel@brahma.wcg.mcgill.ca
Whole thread Raw
Responses Re: Permissions issue?
Re: Permissions issue?
List 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@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@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@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@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)


pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Reload bytea [was Re: Picture with Postgres and Delphi]
Next
From: Sai Hertz And Control Systems
Date:
Subject: Re: Excel, OpenOffice and Postgres