Check out the GRANT command in postgres; you'll want to do something like:
CREATE USER nobody WITH PASSWORD <whatever>;
GRANT SELECT ON <tablename1>,<tablename2> TO nobody;
However, I like to use suExec under apache to have things run by a
different user; that offers somewhat more security. I have scripts that
need, for example, access to our departmental database run as 'dtwww' (a
user without a shell), and use the above to create the user not as nobody
but as dtwww.
hope this helps.
---------------------------------------------------------------------
Andrew J. Perrin - [EMAIL PROTECTED] - NT/Unix Admin/Support
Department of Demography - University of California at Berkeley
2232 Piedmont Avenue #2120 - Berkeley, California, 94720-2120 USA
http://demog.berkeley.edu/~aperrin --------------------------SEIU1199
On Thu, 16 Mar 2000, Mike Edwards wrote:
> Hello all,
> My apologies if this has been covered here, but the archives are choking
> and TFMs don't seem to cover this too deeply.
> I am using PostgreSQL with PHP/Apache. PHP connects to Postgres as
> Linux user "nobody" (the user running the Apache daemon) unless a
> username and password is explicitly supplied. But I would like to let
> user "nobody" connect to a database not owned by "nobody". Do I do this
> using groups and a POstgres user "nobody", and if so, can I restrict
> access with read-write vs. read-only privledges?
>
> Or is the short answer to create my databases as user "nobody"?
>
> Thanks!
> Mike
>
> --
> Mike Edwards, MIS
> Edwards Graphic Arts, Inc.
> 2700 Bell Avenue
> Des Moines, IA 50321
>