Linux distributions
TMA-RHEL9-6.1.2.6
Ensure access to the rsyslog work directory is configured
Açıklama
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.
Nasıl denetlenir
Denetim yöntemi: Kabuk komutu
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- Beklenen çıktı
compliant
Nasıl düzeltilir
Düzeltme yöntemi: Kılavuz veya altyapı yaması
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
Özellikler
- İşletim sistemleri
- rhel-9
- Etiketler
- cis-convertedlinux
- Referans
- CIS Red Hat Enterprise Linux 9 Benchmark v3.0.0 - 6.1.2.6
Bu ana makineyi denetle
Bunu denetleme izniniz olan bir makinede çalıştırın. Tarama salt okunurdur.
tmaegis scan --target linux