Skip site navigation (1) Skip section navigation (2)

Warning: PostgreSQL query failed: ERROR: [my_table]: Permission denied in [my_php_program]

From: Barker <barkerds(at)snybufaf(dot)buffalostate(dot)edu>
To: pgsql-bugs(at)postgresql(dot)org
Subject: Warning: PostgreSQL query failed: ERROR: [my_table]: Permission denied in [my_php_program]
Date: 2002-08-09 11:20:50
Message-ID: Pine.OSF.4.05.10208090716320.2179-100000@snybufaf.buffalostate.edu (view raw or flat)
Thread:
Lists: pgsql-bugs
Can someone tell me why my PHP command [pg_exec ($database, $line );]
causes the "Permission denied" error.
I am trying to use PostgreSQL 7.2, PHP4, and Web-based apache user
I have focused on pg_hba.conf; -i option; and making sure that
user apache is a valid Unix user.
I have included the parts that may be helpful.

------------------------
Error Message:
octave ... INSERT INTO use VALUES ('2002-08-08', '18:04:34',
'136.183.17.43', '3222', 'Mozilla/4.72
[en] (X11; U; Linux 2.2.14-5.0 i686)' );

Warning: PostgreSQL query failed: ERROR: use: Permission denied. in
/var/www/html/octave/A2.php
on line 113

-----------------------
A2.php:  (lines 112 & 113)
       print("$dbName ... $line<p>");    /* TEST */
       pg_exec ($database, $line );

------------------------------------
pg_hba.conf:
host   all     0.0.0.0 0.0.0.0 trust
host       all         127.0.0.1     255.255.255.255    trust
local   all                     trust

------------------------------------
/etc/rc.d/init.d/postgresql:
su -l postgres -s /bin/sh -c "/usr/bin/pg_ctl -o "-i"  -D $PGDATA -p
/usr/bin/postmaster start  > /dev/null 2>&1" < /dev/null

-------------------------------------
firewall off

-----------------------
Proof that apache user is authorized as a Unix user:
bash-2.05a$ psql -U apache octave
Welcome to psql, the PostgreSQL interactive terminal.

Type:  \copyright for distribution terms
       \h for help with SQL commands
       \? for help on internal
       \g or terminate with semicolon to execute query
       \q to quit

-----------------------------

Thanks,
Steve Barker



pgsql-bugs by date

Next:From: pgsql-bugsDate: 2002-08-12 10:02:32
Subject: Bug #735: Server crash when using dynamic SQL and disabling recursion
Previous:From: Bruce MomjianDate: 2002-08-08 23:28:34
Subject: Re: Bug #732: LIMIT clause bugs with insert...select

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group