The containerd socket file should be owned by root

docker

Classification:

compliance

Framework:

cis-docker

Control:

3.23

Description

The containerd socket should be owned by user root and group root.

Rationale

Whoever can use the containerd socket controls every container of the host. Its owner can change it, so the owner and group should be root only.

Audit

Show the owner and group of /run/containerd/containerd.sock:

stat -c '%U:%G' /run/containerd/containerd.sock

Datadog passes the rule when /run/containerd/containerd.sock belongs to root:root, fails it when it belongs to another user or group, and reports it not applicable when the path is absent.

Remediation

Set the owner and group:

chown root:root /run/containerd/containerd.sock

Impact

None.

Default value

containerd creates its socket with owner root:root.