mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2026-08-19 01:15:04 -05:00
Override EnhancedRotatingFileHandler._open() so the active log file and rotated backups are created owner-only on POSIX. The parent DATA_DIR is already 0o700, so this is defense-in-depth — but the log file can contain sensitive context (auth events, query fragments, paths) and should not be world/group readable on its own. Pre-existing log files keep their current permissions; new installs and rotated files pick up the tighter mode. Windows uses the default open path since os.open mode is ignored there.