Re: BUG #4116: Cannot create tablespace: could not set permissions on directory

Поиск
Список
Период
Сортировка
От Graham Leggett
Тема Re: BUG #4116: Cannot create tablespace: could not set permissions on directory
Дата
Msg-id 485A5468.8040800@sharp.fm
обсуждение исходный текст
Ответ на Re: BUG #4116: Cannot create tablespace: could not set permissions on directory  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
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
--

В списке pgsql-bugs по дате отправления:

Предыдущее
От:
Дата:
Сообщение: BUG advisory_lock
Следующее
От: Tom Lane
Дата:
Сообщение: Re: BUG advisory_lock