Quantcast
Channel: Question and Answer » postgresql
Viewing all articles
Browse latest Browse all 1138

Postgres 9.4 – How to really grant all privileges on a database to another user?

$
0
0

Just a heads up, I’m fairly new at this whole DBA thing.

Okay, with that out of the way I’ve been struggling mightily lately with granting access to a database in postgres to a user.

Let’s call the database “livedb” and the user “web.” livedb is owned by the postgres user, and for reasons I won’t go into it has to be owned by that user. It’s on schema “public,” as I did not create or specify a schema. I want to make it so the user web has every privilege possible on the database (almost as if it also owns the database.)

I’m failing utterly at this though. I’ve logged in as postgres and ran the following commands:

GRANT ALL PRIVILEGES ON DATABASE livedb TO web;
GRANT ALL PRIVILEGES ON ALL SEQUENCES IN SCHEMA public TO web;
GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA public TO web;

None of those have been able to grant anything more than Connect, Create, and Temporary privileges:

web=CTc/postgres

As a result, the application still fails the second it tries to do a select statement, since it still doesn’t have permissions for that.

How would I go about doing this correctly? I’m stumped.


Viewing all articles
Browse latest Browse all 1138

Latest Images

Trending Articles



Latest Images