Linux distributions
TMA-ROCKY9-6.1.2.6
Ensure access to the rsyslog work directory is configured
Opis
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.
Kako se proverava
Metod provere: Komanda ljuske
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- Očekivani izlaz
compliant
Kako se ispravlja
Metod ispravke: Smernica ili zakrpa infrastrukture
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
Svojstva
- Operativni sistemi
- rocky-9
- Oznake
- cis-convertedlinux
- Referenca
- CIS Rocky Linux 9 Benchmark v3.0.0 - 6.1.2.6
Proverite ovaj računar
Pokrenite ovo na računaru za koji imate dozvolu za proveru. Skeniranje radi u režimu samo za čitanje.
tmaegis scan --target linux