TMAegis베타
linux 관련 규칙 더 보기

Linux distributions

TMA-RHEL9-6.1.2.6

Ensure access to the rsyslog work directory is configured

보통레벨 1자동linux

설명

rsyslog's work directory, set by the global $WorkDirectory / global(workDirectory=...) directive and defaulting to /var/lib/rsyslog, stores disk-assisted queue spool files. These files can hold buffered log data written to disk when in-memory queues are exhausted or a forwarding action is retrying. The work directory should be owned by root, group- owned by root, and accessible only to root.

점검 방법

감사 방식: 셸 명령

shell
alt0() { o=$(bash -c 'grep -Psi -- '"'"'^[^#]*(WorkDirectory|workDirectory)\s*[= ]'"'"' /etc/rsyslog.conf /etc/rsyslog.d/*.conf 2>/dev/null' 2>/dev/null); [ -z "$o" ] || { echo "step1: $o" | head -c 300; return 1; }; command -v find >/dev/null 2>&1 || { echo "step2: find not installed"; return 1; }; o=$(bash -c 'find /var/lib/rsyslog -maxdepth 0 -type d \( ! -user root -o ! -group root -o -perm /0077 \) 2>/dev/null' 2>/dev/null); [ -z "$o" ] || { echo "step2: $o" | head -c 300; return 1; }; }; if alt0; then echo compliant; fi
예상 출력
compliant

조치 방법

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

Run the following commands to set ownership to root:root and remove all group and other access from the work directory (substitute a non-default $WorkDirectory path if configured): # chown root:root /var/lib/rsyslog # chmod go-rwx /var/lib/rsyslog

속성

운영 체제
rhel-9
태그
cis-convertedlinux
참고 자료
CIS Red Hat Enterprise Linux 9 Benchmark v3.0.0 - 6.1.2.6

이 호스트 점검하기

감사 권한이 있는 시스템에서 실행하세요. 스캔은 읽기 전용입니다.

shell
tmaegis scan --target linux