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

From Tom Lane
Subject Re: [SOLVED] Re: initdb error: "could not identify current directory" (or, what have i done now?)
Date
Msg-id 23614.1102184128@sss.pgh.pa.us
Whole thread Raw
In response to Re: [SOLVED] Re: initdb error: "could not identify current  (OpenMacNews <pgsql-general.20.openmacnews@spamgourmet.com>)
Responses Re: [SOLVED] Re: initdb error: "could not identify current  (OpenMacNews <pgsql-general.20.openmacnews@spamgourmet.com>)
List pgsql-general
OpenMacNews <pgsql-general.20.openmacnews@spamgourmet.com> writes:
> whoa! i wasn't suggesting that at all ... rather, perhaps, simply a perms check
> from within the initdb script and an 'informative' error to the
> end-user.

We're doing the best we can already: when the failure occurs, we really
don't know which directory is the problem, and cannot find out because
we can't navigate above it to find out its name.

I note that pwd is not any better:

g42:~ tgl$ mkdir ~/zit
g42:~/zit tgl$ mkdir ~/zit/zap
g42:~/zit tgl$ chmod 111 ~/zit
g42:~/zit tgl$ cd ~/zit/zap
g42:~/zit/zap tgl$ pwd
/Users/tgl/zit/zap
g42:~/zit/zap tgl$ /bin/pwd
pwd: : Permission denied
g42:~/zit/zap tgl$

(bash is probably not doing anyone any favors by masking the problem in
its built-in PWD command.)

There are limited situations where it makes sense to create a directory
that has execute but not read permissions ("drop box" directories being
the main thing I can think of offhand).  But it's simply wrong to
create a directory that way without a very specific purpose in mind.
You need to try to reconstruct how /Volumes/data/ got to be that way,
and see if it was simple pilot error or if some tool messed up the
permissions for you.

            regards, tom lane

pgsql-general by date:

Previous
From: OpenMacNews
Date:
Subject: Re: [SOLVED] Re: initdb error: "could not identify current
Next
From: OpenMacNews
Date:
Subject: Re: [SOLVED] Re: initdb error: "could not identify current