Re: [SOLVED] Re: initdb error: "could not identify current - Mailing list pgsql-general

From OpenMacNews
Subject Re: [SOLVED] Re: initdb error: "could not identify current
Date
Msg-id E3788CFE067258CED35C7D2F@tiedgar.internal.presence-group.net
Whole thread Raw
In response to Re: [SOLVED] Re: initdb error: "could not identify current directory" (or, what have i done now?)  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: [SOLVED] Re: initdb error: "could not identify current directory" (or, what have i done now?)  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
hi tom,

>>    % ls -ald /Volumes/data
>>         drwxr-x--x  12 openmac wheel 408 Nov 27 15:25 /Volumes/data/
>
> Ah-hah, yes that's undoubtedly it.

and, since i've cleared that up pgsql is, again, behaving. yay.

for posterity's -- and other OSX users' -- sake, that's:

for the relevant drives/mounts in /Volumes, you need:

   perms >= 555 (i use)
   group should include your pgsql unprivileged user
        'default' ownership, i believe, is root:admin for mounts, hence your
pgsql user
        would need to be added as a user to grup:admin

>> if this *does* turn out to be the case, does it make sense to have the script
>> check perms up through the physical/path of the cwd and report with a more
>> specific/desciptive error if they're not at least 555 on the mount
>> point?
>
> I'm not in the business of reimplementing getcwd(); especially not to
> deal with a problem that will break many other things besides Postgres.

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. if i
were the 1st/only to see such an issue, i'd, of course, not even bother with
the suggestion ... but, as we've seen, it's raised its ugly head elsewhere
(google: 'getcwd initdb')

> I'd suggest filing a bug against whatever tool you used to create
> /Volumes/data/, suggesting that they adopt a less brain-dead default
> permissions setting.  Execute-only on a mount point is just silly.

i have a suspicion it has to do with my filesharing/automount
system/setup/settings.  i'd had a bunch o' headaches a fairly long while back
w/ getting Samba, AFS & NFS to play nice together.  i'm fairly sure perms were
changed, and the mount points may have been (inadvertently?) munged.  why is
'suddenly' changed in the last days, i have no flippin' idea as yet!

postgresql may have been, simply, the 1st (me <-- surprised) app to 'hit' the
getcwd path sensitivity.

hence, i think i have to file a bug-report with myself ...  =)

two points o' feedback:

(a) without your help/suggestions, finiding this would've taken me a *lot*
longer (thx!), and
(b) if this is in the pgsql docs (should it be?), i simply missed, misread or
misunderstood it.

cheers,

richard

pgsql-general by date:

Previous
From: Robert McClenon
Date:
Subject: Re: 3rd RFD: comp.databases.postgresql (was: comp.databases.postgresql.*)
Next
From: Tom Lane
Date:
Subject: Re: [SOLVED] Re: initdb error: "could not identify current directory" (or, what have i done now?)