Skip to content

0303-docker-service-priv-docker.service file permissions not set to 644 or stricter


Rule ID

  • 0303-docker-service-priv

Category

  • container

Level

  • warn

Compatible Versions

  • Linux

Description

  • If you are using Docker on a machine that uses systemd to manage services, verify that the Docker.service file permissions are correctly set to 644 or stricter.

Scan Frequency

  • 0 */30 * * *

Rationale

  • The docker.service file contains sensitive parameters that may alter the behavior of the Docker daemon. Therefore, no user other than root should have write access to it to maintain file integrity.

Risk Items

  • Container Security

Audit Method

  • Execute the following command to verify that the file permissions are set to 644 or stricter:
stat -c %a /usr/lib/systemd/system/docker.service

Remediation

  • Execute the following command:
#> chmod 644 /usr/lib/systemd/system/docker.service

This sets the file permissions to 644.

Impact

  • None

Default Value

  • This file may not exist on the system. In that case, this recommendation is not applicable. By default, if the file exists, the file permissions are correctly set to 644.

References

CIS Controls

  • None

Feedback

Is this page helpful?