From: | Ross Boylan <ross(at)biostat(dot)ucsf(dot)edu> |
---|---|
To: | pgsql-novice(at)postgresql(dot)org |
Cc: | ross(at)biostat(dot)ucsf(dot)edu |
Subject: | permissions |
Date: | 2012-05-31 06:26:26 |
Message-ID: | 1338445586.4773.36.camel@corn.betterworld.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-novice |
Is there an easy way to give role x blanket access to the objects in a
database?
I started with a default Debian setup of 8.4, which gives each OS user
passwordless login to their own databases if you setup a pg user with
the same name.
Edited pg_hba.conf to trust all users for the database of interest,
rossmail. Owner is ross.
As OS user Debian-exim, login to mydb. This works, but I get
"permission denied" when I tried to access the table.
As postgres, grant all privileges on database rossmail to "Debian-exim";
This didn't help. Perhaps it's relevant that I got a syntax error
unless I quoted Debian-exim, I assume because of the dash.
My theory is that I would need to grant privileges individually for each
table, index, ....
Is that theory right? Is there a command to do it all at once? I
though grant ... database... was that command, but it didn't work.
At this point I backed up and had OS user Debian-exim connect to the
database as PG user ross. That worked, albeit with minimal security.
Although my immediate problem is solved, I'd like to understand what's
going on.
Ross
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2012-05-31 06:28:51 | Re: how to call stored procedures that are writes |
Previous Message | Ross Boylan | 2012-05-31 06:09:49 | Re: how to call stored procedures that are writes |