TMAegisBêta
Plus de règles pour linux

Linux distributions

TMA-ROCKY9-6.1.2.6

Ensure access to the rsyslog work directory is configured

MoyenneNiveau 1Automatiséelinux

Description

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.

Méthode de vérification

Méthode d'audit: Commande shell

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
Sortie attendue
compliant

Méthode de correction

Méthode de correction: Recommandation ou correctif d'infrastructure

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

Propriétés

Systèmes d'exploitation
rocky-9
Étiquettes
cis-convertedlinux
Référence
CIS Rocky Linux 9 Benchmark v3.0.0 - 6.1.2.6

Vérifier cet hôte

Exécutez cette commande sur une machine que vous êtes autorisé à auditer. L'analyse est en lecture seule.

shell
tmaegis scan --target linux