From owner-freebsd-questions Sat Jun 5 9:57:26 1999 Delivered-To: freebsd-questions@freebsd.org Received: from spider1.spiderlink.com (spider1.spiderlink.com [206.83.176.160]) by hub.freebsd.org (Postfix) with ESMTP id 2B76314C3C for ; Sat, 5 Jun 1999 09:57:25 -0700 (PDT) (envelope-from jim@freeze.org) Received: from zw9js (mimas.remote.qx.net [208.200.110.224]) by spider1.spiderlink.com (post.office MTA v2.0 0813 ID# 0-29967U60) with SMTP id AAA258; Sat, 5 Jun 1999 09:56:00 -0700 Message-ID: <000a01beaf74$88f55840$e06ec8d0@lexmark.com> From: "Jim Freeze" To: , Subject: PostgreSQL query has permission denied error Date: Sat, 5 Jun 1999 12:57:44 -0400 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.00.2314.1300 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG I am using FreeBSD 3.1 and netscape on a standalone system. I have the ports install of apache, php3 and postgreSQL installed. I have created a database called mydb with a table tableone and two fields, fieldone and fieldtwo. I have also added two rows of information. My goal is to access this database from a web page. Although I can get the name of the database, I cannot perform queries on the databse. The following code produces the following error Warning: PostgresSQL query failed: ERROR: tableone: Permission denied. in /usr/local/www/data/php1.php3 on line 17 An error occured. where line 17 is 17: $result = pg_Exec($dbc, "SELECT * FROM tableone"); Since I don't understand what is going on here, I tried logging into my BSD account as root, pgsql and postgres, and accessing the web page, but I received the same error. In case it helps, the following is an excerpt of my passwd file. nobody:*:65534:65534:Unprivileged user:/nonexistent:/sbin/nologin jfreeze:*:1001:1001:User &Jim Freeze:/usr/jfreeze:/bin/csh pgsql:*:70:70:PostgreSQL pseudo-user:/usr/local/pgsql:/bin/sh postgres:*:1002:1002:User &PostgreSQL SuperUser:/usr/postgres:/bin/sh I do not know how to list the pgsql users and privelages, if that info is needed. Thanks for any help. ================== Dr Jim D. Freeze jim@freeze.org ================== To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message