---
title: The Docker socket file should have permissions of 660 or stricter
description: Datadog, the leading service for cloud-scale monitoring.
breadcrumbs: >-
  Docs > Datadog Security > OOTB Rules > The Docker socket file should have
  permissions of 660 or stricter
---

> For the complete documentation index, see [llms.txt](https://docs.datadoghq.com/llms.txt).

# The Docker socket file should have permissions of 660 or stricter
Classification:complianceFramework:cis-dockerControl:3.16 
## Description{% #description %}

The Docker socket should have mode 660 or stricter.

## Rationale{% #rationale %}

Whoever can use the Docker socket controls the Docker daemon, and through it the host. Mode 660 or stricter limits its use to its owner and group.

## Audit{% #audit %}

Show the mode of `/var/run/docker.sock`:

```bash
stat -c '%a' /var/run/docker.sock
```

Datadog passes the rule when `/var/run/docker.sock` has mode 660 or stricter, fails it when the mode is less strict, and reports it not applicable when the path is absent.

## Remediation{% #remediation %}

Set the mode:

```bash
chmod 660 /var/run/docker.sock
```

## Impact{% #impact %}

None.

## Default value{% #default-value %}

Docker creates the socket with mode 660.

## References{% #references %}

1. [https://docs.docker.com/reference/cli/dockerd/#daemon-socket-option](https://docs.docker.com/reference/cli/dockerd/#daemon-socket-option)
1. [https://docs.docker.com/reference/cli/dockerd/#bind-docker-to-another-hostport-or-a-unix-socket](https://docs.docker.com/reference/cli/dockerd/#bind-docker-to-another-hostport-or-a-unix-socket)
