pg.ddx.io  pgsql-odbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Greg Cocks <gcocks@stoller.com>
To: pgsql-odbc@postgresql.org
Subject: Can't get ODBC to work unless the connection user is a 'superuser'...
Date: Wed, 28 Nov 2007 16:19:02 -0700
Message-ID: <66F6CF82BF58CE4DB4285BE816B297E83547EB@tribble.SMStoller.com> (raw)

Hello,

Yep, a newbie, at least to PostgreSQL + ODBC...   :-)

I have:

 - built and populated a PostgreSQL database (including PostGIS, in case that matters in this case)

 - set up ODBC (using psqlodbc-08_02_0500), using the Unicode version as a System DNS

 - successfully connected to the tables in PostgreSQL from an Access 'front end' I built, updated tables, etc, etc


The user in PostgreSQL/ODBC was a superuser - lets call that user FRED...


Wanting now to lock this down a bit I security-wise, I:

 - set FRED as *not* being a SuperUser

 - made a new group role, lets call that grpWrite

 - assigned (sic) FRED to grpWrite

 - set the GRANT permissions on all the non-system tables to be SELECT, INSERT, DELETE and UPDATE (took me a bit to find and use that function!), so the grpWrite privileges on each non-system table reads 'arwdx' 

 - tested FRED with phpPgAdmin - works just as expected, full read write access to the data but NOT things such as vacuum, etc

 - checked the TEST on my ODBC driver, 'CONNECTION SUCCESSFUL'

When I go to the Access 'front end' now, I can refresh all the tables in the Linked Table Manager (suggest the CONNECT is A-OK) but when I try and view data in a table, etc I get the error in MS Access:

	ODBC--call failed
	ERROR: permission denied for relation <table_name>;
	Error while executing the query (#7)

Tried, with no luck:

 - setting the GRANT on the group role to include REFERENCES

 - opening the MS Access database on the PostgreSQL server

 - as a last resort, setting the GRANT in grpWrite to ALL

The minute I change FRED back to being a SuperUser, works like a charm...

** Suggestions and experiences gratefully accepted! **

Note that MapServer has the same need for FRED to be a SuperUser...

Thanks in advance!


----------
Regards,
GREG COCKS
GIS Analyst V
Gcocks |a| stoller.com
S. M. Stoller Corp
105 Technology Drive, Suite 190
Broomfield, CO 80021
www.stoller.com
303-546-4300
303-443-1408 fax
303-546-4422 direct
303-828-7576 cell




Message-ID: <66F6CF82BF58CE4DB4285BE816B297E83547EB@tribble.SMStoller.com>
Permalink:  ../66F6CF82BF58CE4DB4285BE816B297E83547EB@tribble.SMStoller.com/
Also on:    postgresql.org/message-id/66F6CF82BF58CE4DB4285BE816B297E83547EB@tribble.SMStoller.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-odbc@postgresql.org
  Cc: gcocks@stoller.com
  Subject: Re: Can't get ODBC to work unless the connection user is a 'superuser'...
  In-Reply-To: <66F6CF82BF58CE4DB4285BE816B297E83547EB@tribble.SMStoller.com>
  References: <66F6CF82BF58CE4DB4285BE816B297E83547EB@tribble.SMStoller.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox