Re: initdb error: "could not identify current directory" (or, what have i done now?) - Mailing list pgsql-general

From Tom Lane
Subject Re: initdb error: "could not identify current directory" (or, what have i done now?)
Date
Msg-id 17222.1102122182@sss.pgh.pa.us
Whole thread Raw
In response to Re: initdb error: "could not identify current directory" (or,  (OpenMacNews <pgsql-general.20.openmacnews@spamgourmet.com>)
Responses Re: initdb error: "could not identify current directory" (or,  (OpenMacNews <pgsql-general.20.openmacnews@spamgourmet.com>)
Re: initdb error: "could not identify current directory" (or,  (OpenMacNews <pgsql-general.20.openmacnews@spamgourmet.com>)
List pgsql-general
OpenMacNews <pgsql-general.20.openmacnews@spamgourmet.com> writes:
> then, i stumbled across the following behavior.:

> % rm -rf /var/data/pgsql /Volumes/data/pgsql

> % ls -ald /var/data/pgsql
>     lrwxr-xr-x  1 root wheel 27 Nov 22 20:26 /var/data/pgsql -> /Volumes/data/pgsql

> % ls -ald /Volumes/data/pgsql
>     drwxrwxr-x  12 testuser testuser 408 Nov 25 09:12 /Volumes/data/pgsql

Huh?  Why didn't the rm -rf remove both of those?  Or are you skipping
some steps?

> % cd /var/data/pgsql
> % pwd
>     /Volumes/data/pgsql

This is odd ... when I do pwd I see the path as it was told to cd.  I
have to say /bin/pwd to get what you're showing.

> % sudo -u testuser /usr/local/pgsql/bin/initdb --pgdata=/var/data/pgsql
> --username=testuser

> IT CHOKES.

Couldn't reproduce this, using fully up-to-date 10.3.6.

The man page for getcwd does say that it will fail with EACCES (ie,
"permission denied") if any component of the path is unreadable.
You didn't show us all the steps of the paths /private/var/data and
/Volumes/data ... maybe there's a non-world-readable directory involved?

            regards, tom lane

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: pgsql8b5 not launching on OSX system start; otherwise OK
Next
From: OpenMacNews
Date:
Subject: Re: pgsql8b5 not launching on OSX system start; otherwise OK