TMA-DOCKER-3.5
Ensure that the /etc/docker directory ownership is set to root:root
CaoCấp 1Tự độngdocker
Mô tả
The /etc/docker directory (holds TLS keys and daemon config) must be owned by root:root so that unprivileged users cannot alter Docker behaviour. The audit stats every existing candidate path (/etc/docker); not applicable when none exists.
Cách kiểm tra
Phương pháp kiểm tra: Lệnh shell
shell
for f in /etc/docker; do [ -e "$f" ] || continue; o=$(stat -Lc '%U:%G' "$f") || exit 1; [ "$o" = root:root ] || { echo "$f $o"; exit 0; }; done; echo compliant- Đầu ra mong đợi
compliant
Cách khắc phục
Phương pháp khắc phục: Lệnh shell
shell
for f in /etc/docker; do if [ -e "$f" ]; then chown root:root "$f" || exit 1; fi; doneThuộc tính
- Hệ điều hành
- Bất kỳ
- Thẻ
- dockerpermissions
- Tham chiếu
- CIS Docker Benchmark v1.9.0 - 3.5 Ensure that the /etc/docker directory ownership is set to root:root
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.
shell
tmaegis scan --target docker