BUG #4619: pg_ctl reports strange error message when be executed on non executable directory - Mailing list pgsql-bugs

From Hiroshi Saito
Subject BUG #4619: pg_ctl reports strange error message when be executed on non executable directory
Date
Msg-id 200901160214.n0G2EUCk057623@wwwmaster.postgresql.org
Whole thread Raw
Responses Re: BUG #4619: pg_ctl reports strange error message when be executed on non executable directory
List pgsql-bugs
The following bug has been logged online:

Bug reference:      4619
Logged by:          Hiroshi Saito
Email address:      hiroshi3110@gmail.com
PostgreSQL version: 8.3.5
Operating system:   Mac OS X 10.5.6
Description:        pg_ctl reports strange error message when be executed on
non executable directory
Details:

$ sudo -u postgres ls
ls: .: Permission denied
$ sudo -u postgres /opt/local/lib/postgresql83/bin/pg_ctl -D
/opt/local/var/db/postgresql83/defaultdb start
could not identify current directory: Permission denied
could not identify current directory: Permission denied
could not identify current directory: Permission denied
The program "postgres" is needed by pg_ctl but was not found in the
same directory as "pg_ctl".
Check your installation.

$ cd /tmp
$ sudo -u postgres /opt/local/lib/postgresql83/bin/pg_ctl -D
/opt/local/var/db/postgresql83/defaultdb start
LOG:  database system was shut down at 2009-01-16 10:48:59 JST
LOG:  database system is ready to accept connections
LOG:  autovacuum launcher started

I think changing current directory before executing pg_ctl is VERY BAD KNOW
HOW. I think this is going to prevent novice to use PostgreSQL.
Or something I missed? Bad configuration?

Many users seem to be tumbled upon this issue:
http://www.google.com/search?hl=en&q=pg_ctl+%22could+not+identify+current+di
rectory%3A+Permission+denied%22&btnG=Google+Search&aq=f&oq=

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: pg_listener entries deleted under heavy NOTIFY load only on Windows
Next
From: "brian"
Date:
Subject: BUG #4618: nolock changes first column name of query result set to 'nolock'