0307-docker-socket-priv-docker.socket file permissions are not set to 644 or more restrictive
Rule ID
Category
Level
Compatible Versions
Description
- If Docker is used on a computer that manages services with systemd, verify that the ownership and group ownership of the 'docker.socket' file are correctly set to 'root'.
Scan Frequency
Theoretical Basis
- The docker.socket file contains sensitive parameters that may alter the behavior of the Docker remote API. Therefore, it should only be writable by root to maintain the integrity of the file.
Risk Items
Audit Method
- Execute the following command to verify that the file permissions are correctly set to "644" or more restrictive:
stat -c %a /usr/lib/systemd/system/docker.socket
The above command should return no output.
- Execute the following command:
#> chmod 644 /usr/lib/systemd/system/docker.socket
This will set the file permissions of this file to "644".
Impact
Default Value
- This file may not exist on the system. In this case, this recommendation does not apply. By default, if the file exists, the file permissions for this file will be correctly set to '644'.
References
CIS Controls