Re: How to change mode for cluster log?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Binghan,

> On 26. Jan, 2021, at 15:33, Binghan <binghanluc@xxxxxxxxx> wrote:
> 
> I have the following configuration in postgresql.conf. However, it only ensure the mode 600 for file under pg_log. The cluster log file postgresql-10-main.log has 640. How can control the mode for cluster log in postgres. 
> 
> logging_collector = off	
> log_directory = '/var/log/postgresql/pg_log'
> log_filename = 'postgres-event.log'
> log_file_mode = 0600	

you say, your file "postgresql-10-main.log" has 640 but your log_filename is "postgres-event.log". So the file "postgresql-10-main.log" is something else which your setup generates elsewhere.

In any event, you can enforce read/write permissions for a user only by setting its umask to 0077. Don't forget to change the permissions of your log file. The umask command does not change that!

Your should also make the setting persistent, for example in the profile of user postgres.

Cheers,
Paul





[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux