Tom Lane wrote:
>>> This code makes the incorrect assumption that the platform will allow the
>>> postgres user to set the permissions using chmod.
>
>> Is this something we should do anything about?
>
> IMHO, no. The reason for actually doing the chmod is to verify that we
> own the directory. If it fails, we don't own the directory in any
> meaningful sense. I think the complainant's real problem is that he's
> misconfigured his SELinux permissions.
I'm afraid the machine came with SELinux permissions pre-misconfigured
for me, and postgres didn't help the situation at all by sending me on a
wild goose chase.
The correct way to check the permissions are correct is by testing the
current permission values against what they should be, and then failing
clearly and explicitly with a meaningful error message. Right now the
code takes a short cut, which is easy for the coder, but very painful
for the long suffering administrator.
Regards,
Graham
--