[Featureserver] permission denied to postGIS
Ed Fialkowski
edfialk at gmail.com
Wed Aug 15 16:41:51 EDT 2007
Hey all, I'm revisiting an old brick wall I ran into with getting Feature
Server to read from postGIS. I was hoping to have a working example for a
conference in September. Maybe we'll have an epiphany. I'll go ahead and
say my unix and apache knowledge is mediocre.
Here's my problem:
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
)
I'm running Apache as root. (I didn't set this up, but apparently it was a
prepackaged Apache with RedHat and he had problems when not run as root).
PostGIS *MUST* be started and accessed as "postgres".
I have the entire FeatureServer directory running as "psotgres" user.
[root at niceguy tmp]# ll .s.* -a
srwxrwxrwx 1 postgres postgres 0 Aug 15 14:42 .s.PGSQL.5432
-rwxrwxrwx 1 postgres postgres 28 Aug 15 14:42 .s.PGSQL.5432.lock
This is the lock file, which has 777 permissions.
When I try from command line as "root":
>>> db = psycopg2.connect("dbname=test")
Traceback (most recent call last):
File "<stdin>", line 1, in ?
psycopg2.OperationalError: FATAL: role "root" does not exist
When I try from command line as "postgres":
[postgres at niceguy cgi-bin]$ python
>>> import psycopg2
>>> db = psycopg2.connect("dbname=test")
>>> print db.status
1
It looks (to me) like the python in FeatureServer is not getting executed as
postgres, because it connects fine from the command-line.
So, one question is: Has anyone gotten FeatureServer to read from postGIS?
Would you mind telling me a bit about your setup (webserver, users, etc.).
Other than that, anyone have any ideas?
Thanks.
-Ed
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/featureserver/attachments/20070815/c3249040/attachment.html
More information about the Featureserver
mailing list