RE: Setting Permissions for web viewing
От
Chris
Тема
RE: Setting Permissions for web viewing
Дата
Msg-id
4.2.0.58.20001020084058.00a41da0@203.25.173.1
Ответ на
Список
Дерево обсуждения
Re: data dictionary? Beth Gatewood <bethg@mbt.washington.edu>
Re: data dictionary? Tom Lane <tgl@sss.pgh.pa.us>
changing data type Chris <csmith@squiz.net>
Re: changing data type "D. Duccini" <duccini@backpack.com>
changing datestyle Thomas Good <tomg@q8.nrnet.org>
Re: changing datestyle Jason Davis <jdavis@tassie.net.au>
Re: changing datestyle Thomas Good <tomg@q8.nrnet.org>
Re: changing data type <bmccoy@chapelperilous.net>
Re: changing data type "D. Duccini" <duccini@backpack.com>
Re: changing data type <bmccoy@chapelperilous.net>
Re: changing data type "D. Duccini" <duccini@backpack.com>
Re: changing data type <bmccoy@chapelperilous.net>
Setting Permissions for web viewing "Kevin Leclaire" <kevin@virtualnav.com>
Re: Setting Permissions for web viewing "D. Duccini" <duccini@backpack.com>
RE: Setting Permissions for web viewing "k" <kraznus@yahoo.com>
RE: Setting Permissions for web viewing Chris <csmith@squiz.net>
Re: changing data type Thomas Good <tomg@q8.nrnet.org>
Re: data dictionary? "D. Duccini" <duccini@backpack.com>
I wrote a very basic tutorial (which also has this part in it).
http://designmagick.50megs.com/postgresql-tutorial/
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
>permission errors?
>
>If you started from scratch, I think you would need to do the following
>things:
>
>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
>work exactly?)
Since the user connecting to the database has access (as done with the
grant command).... all I do is
pg_connect("","","","","dbname");
although there might be other / better ways :)
Chris.
В списке pgsql-novice по дате отправления