[Featureserver] permission denied to postGIS

Christopher Schmidt crschmidt at metacarta.com
Mon Jul 23 12:39:23 EDT 2007


On Mon, Jul 23, 2007 at 10:57:58AM -0500, Ed Fialkowski wrote:
> Hi all, I have a postGIS database with data that I'm trying to connect to
> from featureserver, but I get:
> 
> An error occurred: could not connect to server: Permission denied
> 	Is the server running locally and accepting
> 	connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
> 
>  File "./FeatureServer/Server.py", line 232, in cgiHandler
>    format, content = service.dispatchRequest( params, path_info,
> host, post_data, request_method, accepts )
>  File "./FeatureServer/Server.py", line 105, in dispatchRequest
>    datasource.begin()
>  File "./FeatureServer/DataSource/PostGIS.py", line 19, in begin
>    self.db = psycopg2.connect(self.dsn)
> 
> 
> When I try from python command-line:
> >>>psycopg2.connect("dbname=test")
> <connection object at 0x2a9559c128; dsn: 'dbname=test', closed: 0>

The 'closed' here is set to 0, which probably means 'not closed'. 

"Permission denied" usually means 'The user does not have access to the
socket.' This is somewhat expected, since the user that the CGI is
connecting as is www-data, or your webserver user, rather than your
personal user.

Can you check the socket mentioned in the error message? can you see if
it exists? if so, can you attempt to adjust the permissions to 777 or
something super-permissive temporarily to see if it helps? 

Regards,
-- 
Christopher Schmidt
MetaCarta



More information about the Featureserver mailing list