I wrote a very basic tutorial (which also has this part in it).
It's not very comprehensive, but it has a couple of things there.
>The pg_connect command worked as localhost, but then the pg_exec failed with
>If you started from scratch, I think you would need to do the following
>1) determine who the "user" is that the webserver is running as (Suggestions
>on how to do this?)
for linux, not sure if bsd is different..
# ps aux | grep http
gives a list of all the http processes running... check the first column
for the name of the process owner.
>2) set up that user in postgres with createuser (but I'm unsure how to best
>deal with the password, should it be NULL and then restrict the access or
>should it have a value that you pass as a parameter down the road? This
>ties into point 4)
I've just never set a password.
>3) give that user permissions to access the database tables in the psql
>interface with the "GRANT" command
>4) figure out the best way of having the webserver (as "user") connect to
>the database, e.g. the options suggested below (although I assume the first
>option implies that the user is set up with a NULL password? How would this
Since the user connecting to the database has access (as done with the
grant command).... all I do is
although there might be other / better ways :)
In response to
pgsql-novice by date
|Next:||From: Mike White||Date: 2000-10-20 00:35:11|
|Subject: database design|
|Previous:||From: k||Date: 2000-10-19 20:04:28|
|Subject: RE: Setting Permissions for web viewing|