Skip site navigation (1) Skip section navigation (2)


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: (view raw or whole thread)
Lists: pgsql-novice
Is there an easy way to give role x blanket access to the objects in a

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.



pgsql-novice by date

Next:From: Tom LaneDate: 2012-05-31 06:28:51
Subject: Re: how to call stored procedures that are writes
Previous:From: Ross BoylanDate: 2012-05-31 06:09:49
Subject: Re: how to call stored procedures that are writes

Privacy Policy | About PostgreSQL
Copyright © 1996-2015 The PostgreSQL Global Development Group