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

docker

Classification:

compliance

Framework:

cis-docker

Control:

3.21

Cette page n'est pas encore disponible en français. Nous travaillons sur sa traduction.
Si vous avez des questions ou des commentaires concernant notre projet de traduction actuel, n'hésitez pas à nous contacter !

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/