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

Linux distributions

TMA-ROCKY9-7.1.12

Ensure no files or directories without an owner and a group exist

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

Описание

Administrators may delete users or groups from the system and neglect to remove all files and/or directories owned by those users or groups.

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

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

shell
alt0() { o=$(bash -c '#!/usr/bin/env bash

{
   a_path=(-path "*/containers/storage/*" -o -path "*/containerd/*" -o -path "*/kubelet/*" -o -path "*/docker/*" -o -path "/sys/*" -o -path "/snap/*" -o - path "/boot/efi/*")
   while IFS= read -r l_mount; do
      find "$l_mount" -mount -xdev \( "${a_path[@]}" \) -prune -o \
         \( -type f -o -type d \) \( -nouser -o -nogroup \) -printf '"'"'%u %g %p\n'"'"' 2>/dev/null
   done < <(findmnt -Dkerno fstype,target | awk '"'"'($1 !~ /^[[:space:]]*(nfs|proc|cifs|smb|vfat|iso9660|efivarfs|selinuxfs|ncpfs)/ && $2 !~ /^(\/run|\/tmp|\/var\/tmp)(\/|$)/){print $2}'"'"')
}' 2>&1); [ -z "$o" ] || { echo "step1: $o" | head -c 300; return 1; }; }; if alt0; then echo compliant; fi
Ожидаемый вывод
compliant

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

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

Remove or set ownership and group ownership of these files and/or directories to an active user on the system as appropriate.

Свойства

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

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

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

shell
tmaegis scan --target linux