---
title: The daemon.json file should have permissions set to 644 or stricter
description: Datadog, the leading service for cloud-scale monitoring.
breadcrumbs: >-
  Docs > Datadog Security > OOTB Rules > The daemon.json file should have
  permissions set to 644 or stricter
---

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

# The daemon.json file should have permissions set to 644 or stricter
Classification:complianceFramework:cis-dockerControl:3.18 
## Description{% #description %}

The `daemon.json` file should have mode 644 or stricter.

## Rationale{% #rationale %}

`daemon.json` sets the options of the Docker daemon. Mode 644 or stricter leaves only root able to write it.

## Audit{% #audit %}

Find the file that dockerd takes with `--config-file`, then show the mode of that file and of `/etc/docker/daemon.json`:

```bash
ps -o args= -C dockerd
stat -c '%a' /etc/docker/daemon.json
```

Datadog checks the file named by the `--config-file` flag of the dockerd command line, and `/etc/docker/daemon.json`. It passes the rule when every file found has mode 644 or stricter, fails it when one has a less strict mode, and reports it not applicable when there is none.

## Remediation{% #remediation %}

Set the mode of the file:

```bash
chmod 644 /etc/docker/daemon.json
```

## Impact{% #impact %}

None.

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

The file exists once the administrator creates it. When root writes it with the default umask, it has root:root and mode 644.

## References{% #references %}

1. [https://docs.docker.com/reference/cli/dockerd/#daemon-configuration-file](https://docs.docker.com/reference/cli/dockerd/#daemon-configuration-file)
