[GENERAL] Log file permissions?

2008-01-31 Thread Glyn Astill
I've noticed that by default postgres writes its log files read/write only by the postgres user. I have a nagios user I want to be able to analyse the logs. Is there a way to make postgres output them so they can be read by a group? Or am I going to have to write a script? Glyn

Re: [GENERAL] Log file permissions?

2008-01-31 Thread Douglas McNaught
On 1/31/08, Glyn Astill [EMAIL PROTECTED] wrote: I've noticed that by default postgres writes its log files read/write only by the postgres user. I have a nagios user I want to be able to analyse the logs. Is there a way to make postgres output them so they can be read by a group? Or am I

Re: [GENERAL] Log file permissions?

2008-01-31 Thread Alvaro Herrera
Douglas McNaught wrote: On 1/31/08, Glyn Astill [EMAIL PROTECTED] wrote: I've noticed that by default postgres writes its log files read/write only by the postgres user. I have a nagios user I want to be able to analyse the logs. Is there a way to make postgres output them so they can

Re: [GENERAL] Log file permissions?

2008-01-31 Thread Glyn Astill
--- Alvaro Herrera [EMAIL PROTECTED] wrote: PG itself only writes to stdout/stderr or uses syslog(). The way logs are generated and stored is distro-specific, so you need to look at how your distro does things (perhaps modifying the startup script). Actually, as of 8.0 there is

Re: [GENERAL] Log file permissions?

2008-01-31 Thread Alvaro Herrera
Glyn Astill wrote: I'm not piping it to a file, postgres is managing the logs. Is there any way to manage the permissions, or do I just need to create a script to change the permissions? I think you should be able to chmod the files after they have been created. The postmaster changes its

Re: [GENERAL] Log file permissions?

2008-01-31 Thread jr
hi, allow me to show-off my ignorance.. I think that logging via 'syslogd' and managing log files with 'logrotate' already meets the requirements. Alvaro Herrera wrote: Perhaps we should add a log_file_group option, to which we would chgrp() the log files. regards, jr. ([EMAIL

Re: [GENERAL] Log file permissions?

2008-01-31 Thread jr
hi, allow me to show-off my ignorance.. I think that logging via 'syslogd' and managing log files with 'logrotate' already meets the requirements. Alvaro Herrera wrote: Perhaps we should add a log_file_group option, to which we would chgrp() the log files. regards, jr. ([EMAIL PROTECTED])

Re: [GENERAL] Log file permissions?

2008-01-31 Thread jr
hi, allow me to show-off my ignorance.. I think that logging via 'syslogd' and managing log files with 'logrotate' already meets the requirements. Alvaro Herrera wrote: Perhaps we should add a log_file_group option, to which we would chgrp() the log files. regards, jr. ([EMAIL PROTECTED])

Re: [GENERAL] Log file permissions?

2008-01-31 Thread Joshua D. Drake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Thu, 31 Jan 2008 18:13:53 + jr [EMAIL PROTECTED] wrote: hi, allow me to show-off my ignorance.. I think that logging via 'syslogd' and managing log files with 'logrotate' already meets the requirements. Unless you don't have access to

Re: [GENERAL] Log file permissions?

2008-01-31 Thread Vivek Khera
On Jan 31, 2008, at 10:21 AM, Alvaro Herrera wrote: Glyn Astill wrote: I'm not piping it to a file, postgres is managing the logs. Is there any way to manage the permissions, or do I just need to create a script to change the permissions? I think you should be able to chmod the files after

Re: [GENERAL] Log file permissions?

2008-01-31 Thread Alvaro Herrera
Vivek Khera wrote: On Jan 31, 2008, at 10:21 AM, Alvaro Herrera wrote: I think you should be able to chmod the files after they have been created. The postmaster changes its umask to 0077, so no file is group-readable. I don't think is configurable either. just move the logs into a

Re: [GENERAL] Log file permissions?

2008-01-31 Thread Chander Ganesan
Alvaro Herrera wrote: Vivek Khera wrote: On Jan 31, 2008, at 10:21 AM, Alvaro Herrera wrote: I think you should be able to chmod the files after they have been created. The postmaster changes its umask to 0077, so no file is group-readable. I don't think is configurable either.