Re: Fwd: Log file

Поиск
Список
Период
Сортировка
От Peter J. Holzer
Тема Re: Fwd: Log file
Дата
Msg-id 20181111162411.qph4hoo4jqwobboe@hjp.at
обсуждение исходный текст
Ответ на Re: Fwd: Log file  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
On 2018-10-29 14:56:06 -0400, Tom Lane wrote:
> Igor Korot <ikorot01@gmail.com> writes:
> > Or I will have to change the owner/group manuall every time I will
> > access the file?
>
> You can set up the log files as readable by the OS group of the server
> (see log_file_mode), and then grant membership in that group to whichever
> OS accounts you trust.

Another way is to use ACLs. Set a default ACL on the log directory which
enforces read permission for some users or groups on all newly created
files.

This is a bit more fine-grained and may be better suited for situations
where different people should be able to read the logs of different
servers. I also find that ACLs are more likely to survive "corrective"
actions by update or init scripts.

Another way would be to log via syslog and configure syslogd to split
the log files according to the username embedded in the log message.

        hp

--
   _  | Peter J. Holzer    | we build much bigger, better disasters now
|_|_) |                    | because we have much more sophisticated
| |   | hjp@hjp.at         | management tools.
__/   | http://www.hjp.at/ | -- Ross Anderson <https://www.edge.org/>

Вложения

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

Предыдущее
От: Rob Nikander
Дата:
Сообщение: query patterns for multipass aggregating
Следующее
От: Andrew Gierth
Дата:
Сообщение: Re: query patterns for multipass aggregating