The TLS CA certificate file (the path of the CA certificate file is specified by --tlscacert) needs to be protected from being tampered with. The certificate file is used by the specified CA certificate to authenticate the Dockerr server. Therefore, the owner and owner group of the CA certificate must be root, and the permission must be 400 to ensure the integrity of the CA certificate.
You can perform the following operations to set the file properties:
chown root:root <path to TLS CA certificate file>
Generally, the path to TLS CA certificate file is /usr/local/share/ca-certificates.
chmod 400 <path to TLS CA certificate file>
The daemon.json file contains sensitive parameters for changing the Docker daemon. It is an important global configuration file. The owner and owner group of the file must be root, and only the root user has the write permission on the file to ensure file integrity. This file does not exist by default.
docker --config-file=""
chown root:root /etc/docker/daemon.json
chmod 600 /etc/docker/daemon.json
Directory |
File Owner |
File Permission |
|---|---|---|
/etc/default/docker |
root:root |
644 or higher |
/etc/sysconfig/docker |
root:root |
644 or higher |
docker.service |
root:root |
644 |
docker.sock |
root:docker |
660 |
/etc/docker |
root:root |
755 or higher |
docker.socket |
root:root |
644 or higher |
If the file or directory does not exist, ignore this part.