pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Make current_logfiles use permissions assigned to files in data 2+ messages / 1 participants [nested] [flat]
* pgsql: Make current_logfiles use permissions assigned to files in data @ 2019-03-24 12:06 Michael Paquier <michael@paquier.xyz> 0 siblings, 0 replies; 2+ messages in thread From: Michael Paquier @ 2019-03-24 12:06 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Make current_logfiles use permissions assigned to files in data directory Since its introduction in 19dc233c, current_logfiles has been assigned the same permissions as a log file, which can be enforced with log_file_mode. This setup can lead to incompatibility problems with group access permissions as current_logfiles is not located in the log directory, but at the root of the data folder. Hence, if group permissions are used but log_file_mode is more restrictive, a backup with a user in the group having read access could fail even if the log directory is located outside of the data folder. Per discussion with the folks mentioned below, we have concluded that current_logfiles should not be treated as a log file as it only stores metadata related to log files, and that it should use the same permissions as all other files in the data directory. This solution has the merit to be simple and fixes all the interaction problems between group access and log_file_mode. Author: Haribabu Kommi Reviewed-by: Stephen Frost, Robert Haas, Tom Lane, Michael Paquier Discussion: https://postgr.es/m/CAJrrPGcEotF1P7AWoeQyD3Pqr-0xkQg_Herv98DjbaMj+naozw@mail.gmail.com Backpatch-through: 11, where group access has been added. Branch ------ REL_11_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/7d7435c5c5050f280692d87f250fabd7eabc4af4 Modified Files -------------- src/backend/postmaster/syslogger.c | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) ^ permalink raw reply [nested|flat] 2+ messages in thread
* pgsql: Make current_logfiles use permissions assigned to files in data @ 2019-03-24 12:06 Michael Paquier <michael@paquier.xyz> 0 siblings, 0 replies; 2+ messages in thread From: Michael Paquier @ 2019-03-24 12:06 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Make current_logfiles use permissions assigned to files in data directory Since its introduction in 19dc233c, current_logfiles has been assigned the same permissions as a log file, which can be enforced with log_file_mode. This setup can lead to incompatibility problems with group access permissions as current_logfiles is not located in the log directory, but at the root of the data folder. Hence, if group permissions are used but log_file_mode is more restrictive, a backup with a user in the group having read access could fail even if the log directory is located outside of the data folder. Per discussion with the folks mentioned below, we have concluded that current_logfiles should not be treated as a log file as it only stores metadata related to log files, and that it should use the same permissions as all other files in the data directory. This solution has the merit to be simple and fixes all the interaction problems between group access and log_file_mode. Author: Haribabu Kommi Reviewed-by: Stephen Frost, Robert Haas, Tom Lane, Michael Paquier Discussion: https://postgr.es/m/CAJrrPGcEotF1P7AWoeQyD3Pqr-0xkQg_Herv98DjbaMj+naozw@mail.gmail.com Backpatch-through: 11, where group access has been added. Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/276d2e6c2d8141f194a26da03b5b79375eb7041b Modified Files -------------- src/backend/postmaster/syslogger.c | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2019-03-24 12:06 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2019-03-24 12:06 pgsql: Make current_logfiles use permissions assigned to files in data Michael Paquier <michael@paquier.xyz> 2019-03-24 12:06 pgsql: Make current_logfiles use permissions assigned to files in data Michael Paquier <michael@paquier.xyz>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox