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

docker

Classification:

compliance

Framework:

cis-docker

Control:

3.21

Esta página aún no está disponible en español. Estamos trabajando en su traducción.
Si tiene alguna pregunta o comentario sobre nuestro proyecto de traducción actual, ¡no dude en contactarnos!

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/