TMAegis
Другие правила для linux

TMA-ROCKY8-6.2.2.4

Ensure rsyslog log file creation mode is configured

СреднийУровень 1Автоматическаяlinux

Описание

rsyslog will create logfiles that do not already exist on the system. The global() configuration object umask, available in rsyslog 8.26.0+, sets the rsyslogd process’ umask. If not specified, the system-provided default is used. The value given must always be a 4-digit octal number, with the initial digit being zero. The legacy $umask parameter sets the rsyslogd process' umask. If not specified, the system-provided default is used. The value given must always be a 4-digit octal number, with the initial digit being zero. The legacy $FileCreateMode parameter allows the setting of the mode with

Как проверяется

Метод проверки: Команда оболочки

shell
alt0() { command -v grep >/dev/null 2>&1 || { echo "step1: grep not installed"; return 1; }; o=$(bash -c 'grep -Ps '"'"'^\h*\$FileCreateMode\h+0[0,2,4,6][0,2,4]0\b'"'"' /etc/rsyslog.conf /etc/rsyslog.d/*.conf' 2>&1); printf '%s\n' "$o" | tr -s ' \t' '  ' | sed 's/^ //;s/ $//' | grep -Fxq -- '$FileCreateMode 0640' || { echo step1: missing '$FileCreateMode 0640'; return 1; }; }; if alt0; then echo compliant; fi
Ожидаемый вывод
compliant

Как исправляется

Метод исправления: Рекомендация или патч инфраструктуры

Edit either /etc/rsyslog.conf or a dedicated .conf file in /etc/rsyslog.d/ and set $FileCreateMode to 0640 or more restrictive: $FileCreateMode 0640 Restart the service: # systemctl restart rsyslog

Свойства

Операционные системы
rocky-8
Теги
cis-convertedlinux
Источник
CIS Rocky Linux 8 Benchmark v3.0.0 - 6.2.2.4

Проверить этот хост

Выполните команду на компьютере, аудит которого вам разрешён. Сканирование работает только на чтение.

shell
tmaegis scan --target linux