TMAegisБета
Више правила за linux

Linux distributions

TMA-ROCKY9-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

Својства

Оперативни системи
rocky-9
Ознаке
cis-convertedlinux
Референца
CIS Rocky Linux 9 Benchmark v3.0.0 - 6.1.2.6

Проверите овај рачунар

Покрените ово на рачунару за који имате дозволу за проверу. Скенирање ради у режиму само за читање.

shell
tmaegis scan --target linux