[MacPorts] #18024: Workaround for annoying pg_ctl's "could not identify current directory: Permission denied"

MacPorts noreply at macports.org
Thu Jan 15 19:23:38 PST 2009


#18024: Workaround for annoying pg_ctl's "could not identify current directory:
Permission denied"
-----------------------------------+----------------------------------------
 Reporter:  hiroshi3110@…          |       Owner:  macports-tickets@…                   
     Type:  enhancement            |      Status:  new                                  
 Priority:  Normal                 |   Milestone:  Port Enhancements                    
Component:  ports                  |     Version:  1.7.0                                
 Keywords:                         |        Port:  postgresql83-server                  
-----------------------------------+----------------------------------------
 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.

-- 
Ticket URL: <http://trac.macports.org/ticket/18024>
MacPorts <http://www.macports.org/>
Ports system for Mac OS


More information about the macports-tickets mailing list