Re: [SOLVED] Re: initdb error: "could not identify current

From: OpenMacNews <pgsql-general(dot)20(dot)openmacnews(at)spamgourmet(dot)com>
To: pgsql-general <pgsql-general(at)postgresql(dot)org>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Subject: Re: [SOLVED] Re: initdb error: "could not identify current
Date: 2004-12-04 17:59:16
Message-ID: E3788CFE067258CED35C7D2F@tiedgar.internal.presence-group.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2004-12-04 18:15:28 Re: [SOLVED] Re: initdb error: "could not identify current directory" (or, what have i done now?)
Previous Message Tom Lane 2004-12-04 17:32:24 Re: [SOLVED] Re: initdb error: "could not identify current directory" (or, what have i done now?)