Re: Permissions problem

From: noy <noyda(at)isoco(dot)com>
To:
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Permissions problem
Date: 2002-02-13 10:13:27
Message-ID: 3C6A3C47.233FB957@isoco.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

Thanks for your help... I had problem with the user's permissions because I
created the users using the shell scripts:

createuser -a login -P

and users created in that way have all the privileges. The man page no makes
references to this. -a, --adduser Allows the new user to create other users.

Thanks.

Tom Lane wrote:
>
> noy <noyda(at)isoco(dot)com> writes:
> > However, any user can make a select or update in the table "accounts".
>
> Surely not.
>
> test71=# select version();
> version
> ------------------------------------------------------------------
> PostgreSQL 7.1.3 on hppa2.0-hp-hpux10.20, compiled by GCC 2.95.3
> (1 row)
>
> test71=# create user foo;
> CREATE USER
> test71=# create user bar;
> CREATE USER
> test71=# \c - foo
> You are now connected as new user foo.
> test71=> create table accounts (f1 int);
> CREATE
> test71=> insert into accounts values(1);
> INSERT 1587112 1
> test71=> revoke all on accounts from public;
> CHANGE
> test71=> \z accounts
> Access privileges for database "test71"
> Table | Access privileges
> ----------+-------------------
> accounts | {"=","foo=arwR"}
> (1 row)
>
> test71=> select * from accounts;
> f1
> ----
> 1
> (1 row)
>
> test71=> \c - bar
> You are now connected as new user bar.
> test71=> select * from accounts;
> ERROR: accounts: Permission denied.
> test71=> update accounts set f1 = 2;
> ERROR: accounts: Permission denied.
> test71=>
>
> Perhaps your "any user" is actually a superuser?
>
> regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Dann Corbit 2002-02-13 10:58:14 Numeric data type conversion form binary cursor -- Am I all wet, or is this about right?
Previous Message Jean-Michel POURE 2002-02-13 09:39:35 ALTER / DROP information for pgAdmin2