pgadmin-org / pgagent

pgAgent - A job scheduler for PostgreSQL
https://www.pgadmin.org/
Other
103 stars 41 forks source link

pgagent log rotation changes owner of logfile to default #35

Closed Pyr0Texn1c closed 7 months ago

Pyr0Texn1c commented 7 months ago

pgagent service is running under postgres user account, but logfile (/var/log/pgagent_16.log) is created with ownership of pgagent:pgagent after rotation. pgagent.txt

dpage commented 7 months ago

pgAgent can only create log files owned by the user it runs as - it doesn't have any code to try to write logs as a different user. You should check the systemd unit file and logrotate (or whatever you are using) are configured appropriately.

Pyr0Texn1c commented 7 months ago

There is indeed the logrotate rule for pgagent logfile. It seems to be created by installation scriptlet when installing from pgdg16 repo. Thanks for the hint!