Re: help (maybe i'm a little stupid)

From: ktt <kestutis98(at)yahoo(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: help (maybe i'm a little stupid)
Date: 2002-07-15 16:58:43
Message-ID: 20020715165843.79228.qmail@web13903.mail.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


no :-)
just add

"sameuser" under
DATABASE
in your configuration line in pg_hba.conf

or read this:

# This record identifies networked hosts that are
permitted to connect
# via IP connections.
#
# Format:
#
# host DBNAME IP_ADDRESS ADDRESS_MASK AUTH_TYPE
[AUTH_ARGUMENT]
#
# DBNAME can be:
# o the name of a PostgreSQL database
# o "all" to indicate all databases
# o "sameuser" to allow access only to databases with
the same
# name as the connecting user

so replace "all" with "sameuser" where you need this.

# TYPE DATABASE IP_ADDRESS MASK
AUTH_TYPE AUTH_ARGUMENT

local all
trust
host all 127.0.0.1 255.255.255.255
trust

--- Thomas Beutin <tyrone(at)laokoon(dot)IN-Berlin(dot)DE> wrote:
> Hi,
>
> On Mon, Jul 15, 2002 at 08:44:39AM +0200, Fabrizio
> wrote:
> > i made a page in php interfacing with postgresql
> server. i had a problem but
> > i solve that one assuming postmaster with options
> -i and specifying port
> > 5432. but then, when i call via browser my page,
> it returns error "fatal1:
> > user apache does not exist...". if i must modify
> pg_hba.conf, how can i do?
> > thanx
> Look for the "createuser" shell command. And don't
> forget to give the permission
> for the tables to this user ("GRANT" command on the
> psql prompt).
> OR
> Connect to the databes as the database super (NOT
> RECOMMENDED).
>
> INHO the best thing is to create an user apache
> without permission for
> database or table creation.
>
> -tb
> --
> Thomas Beutin
> tb(at)laokoon(dot)IN-Berlin(dot)DE
> Beam me up, Scotty. There is no intelligent live
> down in Redmond.
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
> http://archives.postgresql.org

__________________________________________________
Do You Yahoo!?
Yahoo! Autos - Get free new car price quotes
http://autos.yahoo.com

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Linn Kubler 2002-07-15 17:09:40 Re: syncronizing databases?
Previous Message Arjen van der Meijden 2002-07-15 16:34:45 Re: Pushing PostgreSQL to the Limit (urgent!)