TMAegis
postgres 관련 규칙 더 보기

PostgreSQL

TMA-POSTGRES-3.1.4

Ensure the log file destination directory is set correctly

낮음레벨 1수동 검토postgres

설명

The log_directory setting specifies the destination directory for log files when log_destination is stderr or csvlog. It can be specified as relative to the cluster data directory ($PGDATA) or as an absolute path. log_directory should be set according to your organization's logging policy.

점검 방법

감사 방식: 수동 검토

이 권장 사항은 자동으로 점검할 수 없습니다. --include-manual 옵션을 전달하면 스캔 결과에 이 지침과 함께 표시됩니다.

Run SHOW log_directory; (default log, relative to the data directory) and confirm it is the directory defined by your logging policy. Prefer an absolute path outside PGDATA (e.g. /var/log/postgres) so logs are not copied by pg_basebackup or pgBackRest.

조치 방법

조치 방식: 가이드 또는 인프라 패치

ALTER SYSTEM SET log_directory = '/var/log/postgres'; (create it owned by postgres, mode 0700) then SELECT pg_reload_conf();

속성

운영 체제
모두
태그
postgresdatabaseloggingmanual
참고 자료
CIS PostgreSQL 18 Benchmark v1.0.0 - 3.1.4 Ensure the log file destination directory is set correctly