Idira Identity: Permission denied error when starting syslog-writer
Symptom
Docker shows the following error message during the startup of syslog-writer
[root@centos /home]# sudo docker logs
syslog-writer Problem while initializing configs
Details: [Errno 13] Permission denied: '/home/idaptive-syslog-writer/data/config.ini'
Cause
By default, Docker containers are “unprivileged” and cannot, for example, run a Docker daemon inside a Docker container. This is because by default a container is not allowed to access any devices, but a “privileged” container is given access to all devices.
Resolution
Add --privileged option when using docker run to start the container
i.e. sudo docker run --privileged --name syslog-writer -it --log-driver json-file --log-opt max-size=10m --net=host -v `pwd`/data:/home/idapti ve-syslog-writer/data syslogwriter_image
When the operator executes docker run --privileged, Docker will enable access to all devices on the host as well as set some configuration in AppArmor or SELinux to allow the container nearly all the same access to the host as processes running outside containers on the host