对容器主机的 CIS 合规性扫描失败,并显示 "Ensure sticky bit is set on all world writable directory"
Issue
- 当对运行容器工具(如 docker 或 podman)的 Red Hat Enterprise Linux 主机运行检查 CIS 合规性的安全扫描软件时,安全扫描可能会失败,并显示:
Ensure sticky bit is set on all world writable directories
- 以上规则明确列出的有问题的目录和文件是容器文件系统或镜像的一部分,特别是在主机上的 graphRoot 路径中。
- 对于 root 用户,这通常默认是
/var/lib/docker
或/var/lib/containers
。 - 对于无根用户,这通常默认是
$HOME/.local/share/containers
。
- 对于 root 用户,这通常默认是
Environment
- Red Hat Enterprise Linux 7
- Red Hat Enterprise Linux 8
- Red Hat Enterprise Linux 9
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.