Re: permission denied for relation

From: JotaComm <jota(dot)comm(at)gmail(dot)com>
To: Ovid <curtis_ovid_poe(at)yahoo(dot)com>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: permission denied for relation
Date: 2014-01-30 13:46:20
Message-ID: CAA8OQ6_1ZhR4ey4Z8OmK0rtFNERFv+Y2vgubsGb+bCf9qNknkA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello,

2014-01-30 Ovid <curtis_ovid_poe(at)yahoo(dot)com>

> And in the above, by "veure_user" in the pg_hba.conf, I obviously meant "
> some_user".
>
> Cheers,
> Ovid
> --
> IT consulting, training, international recruiting
> http://www.allaroundtheworld.fr/.
> Buy my book! - http://bit.ly/beginning_perl
> Live and work overseas - http://www.overseas-exile.com/
>
>
> On Thursday, 30 January 2014, 14:31, Ovid <curtis_ovid_poe(at)yahoo(dot)com>
> wrote:
>
> Hi all,
>
> Struggling to figure out what I'm doing wrong with postgresql 9.1.11.
>
> I've created a user and database like this:
>
> CREATE USER some_user WITH ENCRYPTED PASSWORD '...';
> CREATE DATABASE mydatabase ENCODING 'UTF8' OWNER some_user TEMPLATE
> template0;
> GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA public TO some_user;
>
> I then have a shell script which rebuilds my database, but when I connect
> with my software, I get this:
>
> DBD::Pg::st execute failed: ERROR: permission denied for relation
> users [for Statement ...
>
> If it matters, my pg_hba.conf has this:
>
> # Database administrative login by Unix domain socket
> local all postgres peer
> local all veure_user trust
>
> And uname:
>
> $ uname -a
> Linux foo.example.com 3.2.0-4-amd64 #1 SMP Debian 3.2.39-2 x86_64
> GNU/Linux
>
> I've gotten this successfully running on my laptop and home machine (both
> Macs) using an identical code base, but I don't know what I'm missing on
> the Debian server.
>
> In short, I have a user that requires full SELECT, INSERT, UPDATE, and
> DELETE privileges on the "mydatabase" database.
>
> Can someone point me in the right direction?
>
>
First: CREATE ROLE and CREATE DATABASE;

After: CREATE TABLEs;

Last: GRANT SELECT,INSERT,UPDATE and DELETE.

>
> Cheers,
> Ovid
> --
> IT consulting, training, international recruiting
> http://www.allaroundtheworld.fr/.
> Buy my book! - http://bit.ly/beginning_perl
> Live and work overseas - http://www.overseas-exile.com/
>
>
>

Regards
--
JotaComm
http://jotacomm.wordpress.com

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Ovid 2014-01-30 14:13:56 Re: permission denied for relation
Previous Message Ovid 2014-01-30 13:34:34 Re: permission denied for relation