For AI agents: A markdown version of this page is available at https://docs.datadoghq.com/security/default_rules/pv5-2tt-sp9.md. A documentation index is available at /llms.txt.

The /etc/sysconfig/docker file should be owned by the root account and group

docker

Classification:

compliance

Framework:

cis-docker

Control:

3.22

Description

The /etc/sysconfig/docker file should be owned by user root and group root.

Rationale

On RHEL and Amazon Linux, /etc/sysconfig/docker can set options of the Docker daemon. Its owner can change it, so the owner and group should be root only.

Audit

Show the owner and group of /etc/sysconfig/docker:

stat -c '%U:%G' /etc/sysconfig/docker

Datadog passes the rule when /etc/sysconfig/docker belongs to root:root, fails it when it belongs to another user or group, and reports it not applicable when the path is absent.

Remediation

Set the owner and group:

chown root:root /etc/sysconfig/docker

Impact

None.

Default value

The Amazon Linux package installs the file with owner root:root and mode 644.

References

  1. https://docs.docker.com/engine/daemon/