[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: *** Newbie Question About PostgreSQL ***



But that only defines permissions on the individual tables of the database.
I'm trying to set permissions on the database itself.  Specifically I'm
trying to prevent users from being able to do CREATE TABLE but still be able
to do SELECTs.

- Arcadio

----- Original Message -----
From: "Andrew Perrin" <aperrin@email.unc.edu>
To: "Arcadio A. Sincero Jr." <asincero@arcadio.net>
Cc: <debian-user@lists.debian.org>
Sent: Tuesday, May 29, 2001 8:58 PM
Subject: Re: *** Newbie Question About PostgreSQL ***


> You should look through the PostgreSQL documentation. But basically, you
> manage users using SQL:
>
> CREATE USER foo WITH PASSWORD bar;
> GRANT READ ON table TO foo;
> REVOKE DELETE ON table FROM foo;
>
> ----------------------------------------------------------------------
> Andrew J Perrin - andrew_perrin@unc.edu - http://www.unc.edu/~aperrin
>     Asst Professor of Sociology, U of North Carolina, Chapel Hill
>       269 Hamilton Hall, CB#3210, Chapel Hill, NC 27599-3210 USA
>
>
> On Tue, 29 May 2001, Arcadio A. Sincero Jr. wrote:
>
> > Hello list,
> >
> > I'd like to set up Postgresql so that users can have "read-only" access
to a
> > database.  Right now, I only know how to set it so a user can have all
or
> > nothing access by adding something like the following in the pg_hba.conf
> > file:
> >
> > local    mydb    crypt    users.mydb
> >
> > And put the names of all the users I want to allow access to the "mydb"
> > database into the users.mydb file.  But like I said, this only allows
all or
> > nothing access to the database.  A user can still do a CREATE TABLE and
add
> > additional tables to the database.  Is there anyway to have it so a user
can
> > only do SELECTs?  Thanks.
> >
> > - Arcadio
> >
> >
> >
> > --
> > To UNSUBSCRIBE, email to debian-user-request@lists.debian.org
> > with a subject of "unsubscribe". Trouble? Contact
listmaster@lists.debian.org
> >
> >
>
>
> --
> To UNSUBSCRIBE, email to debian-user-request@lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact
listmaster@lists.debian.org
>
>



Reply to: