TMA-ROCKY8-6.2.2.4
Ensure rsyslog log file creation mode is configured
Mô tả
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
Cách kiểm tra
Phương pháp kiểm tra: Lệnh 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- Đầu ra mong đợi
compliant
Cách khắc phục
Phương pháp khắc phục: Hướng dẫn hoặc bản vá hạ tầng
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
Thuộc tính
- Hệ điều hành
- rocky-8
- Thẻ
- cis-convertedlinux
- Tham chiếu
- CIS Rocky Linux 8 Benchmark v3.0.0 - 6.2.2.4
Kiểm tra máy này
Chạy lệnh này trên máy bạn được phép kiểm tra. Lần quét chỉ ở chế độ đọc.
tmaegis scan --target linux