Opened 15 years ago

Closed 14 years ago

#18024 closed enhancement (wontfix)

Workaround for annoying pg_ctl's "could not identify current directory: Permission denied"

Reported by: hiroshi3110@… Owned by: mww@…
Priority: Normal Milestone:
Component: ports Version: 1.7.0
Keywords: Cc: jyrkiwahlstedt
Port: postgresql83-server

Description

First just look at lines below:

$ sudo -u postgres ls
ls: .: Permission denied
$ sudo /opt/local/etc/LaunchDaemons/org.macports.postgresql83-server/postgresql83-server.wrapper start
shell-init: error retrieving current directory: getcwd: cannot access parent directories: Permission denied
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
server starting

This issue can be resolved by modifying /opt/local/etc/LaunchDaemons/org.macports.postgresql83-server/postgresql83-server.wrapper By changing current directory to /tmp before executing pg_ctl.

I also submitted the issue on original PostgreSQL: http://www.postgresql.org/support/submitbug The report is referenced as #4619, for now delayed to be investigated by owner.

I hope PostgreSQL team address this, but until that my suggestion will help some of us I suppose.

Change History (6)

comment:1 Changed 15 years ago by hiroshi3110@…

Cc: hiroshi3110@… added

Cc Me!

comment:2 Changed 15 years ago by hiroshi3110@…

Cc: hiroshi3110@… removed

Cc Me!

comment:3 Changed 15 years ago by hiroshi3110@…

Cc: hiroshi3110@… added

Cc Me!

comment:4 Changed 15 years ago by jmroot (Joshua Root)

Cc: jwa@… added; hiroshi3110@… removed
Owner: changed from macports-tickets@… to mww@…

comment:5 Changed 15 years ago by (none)

Milestone: Port Enhancements

Milestone Port Enhancements deleted

comment:6 Changed 14 years ago by jmroot (Joshua Root)

Resolution: wontfix
Status: newclosed

Upstream wontfix'd this, and the wrapper script isn't meant to be run directly anyway.

Note: See TracTickets for help on using tickets.