Docker
TMA-DOCKER-3.22
Ensure that the /etc/sysconfig/docker file ownership is set to root:root
Trung bìnhCấp 2Tự độngdocker
Mô tả
/etc/sysconfig/docker (daemon start-up options) must be owned by root:root. The audit stats every existing candidate path (/etc/sysconfig/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/sysconfig/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/sysconfig/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.22 Ensure that the /etc/sysconfig/docker file 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 --level 2