For AI agents: A markdown version of this page is available at https://docs.datadoghq.com/security/default_rules/85k-m6p-xw9.md. A documentation index is available at /llms.txt.

The /etc/sysconfig/docker file permissions should be set to 644 or stricter

docker

Classification:

compliance

Framework:

cis-docker

Control:

3.21

Description

The /etc/sysconfig/docker file should have mode 644 or stricter.

Rationale

On RHEL and Amazon Linux, /etc/sysconfig/docker can set options of the Docker daemon. Mode 644 or stricter leaves only root able to write it.

Audit

Show the mode of /etc/sysconfig/docker:

stat -c '%a' /etc/sysconfig/docker

Datadog passes the rule when /etc/sysconfig/docker has mode 644 or stricter, fails it when the mode is less strict, and reports it not applicable when the path is absent.

Remediation

Set the mode:

chmod 644 /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/