From 3ec694e17bc01cec4ae2000847f25e3d549888c0 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Fri, 16 Jul 2010 22:25:51 +0000 Subject: Add a log_file_mode GUC that allows control of the file permissions set on log files created by the syslogger process. In passing, make unix_file_permissions display its value in octal, same as log_file_mode now does. Martin Pihlak --- doc/src/sgml/config.sgml | 35 ++++++++++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) (limited to 'doc/src') diff --git a/doc/src/sgml/config.sgml b/doc/src/sgml/config.sgml index 9890f9f6f4e..2a907f6e468 100644 --- a/doc/src/sgml/config.sgml +++ b/doc/src/sgml/config.sgml @@ -1,4 +1,4 @@ - + Server Configuration @@ -2844,6 +2844,39 @@ local0.* /var/log/postgresql + + log_file_mode (integer) + + log_file_mode configuration parameter + + + + On Unix systems this parameter sets the permissions for log files + when logging_collector is enabled. (On Microsoft + Windows this parameter is ignored.) + The parameter value is expected to be a numeric mode + specified in the format accepted by the + chmod and umask + system calls. (To use the customary octal format the number + must start with a 0 (zero).) + + + The default permissions are 0600, meaning only the + server owner can read or write the log files. The other commonly + useful setting is 0640, allowing members of the owner's + group to read the files. Note however that to make use of such a + setting, you'll need to alter to + store the files somewhere outside the cluster data directory. In + any case, it's unwise to make the log files world-readable, since + they might contain sensitive data. + + + This parameter can only be set in the postgresql.conf + file or on the server command line. + + + + log_rotation_age (integer) -- cgit v1.2.3