I've installed a fresh Fedora Server 22. During the setup I selected the option to pre-install Docker. I have activated Docker using Cockpit and installed a new container on the command line:
# docker run -d -h plex --name="plex" -v /etc/docker/plex:/config -v /tank:/data -p 32400:32400 timhaak/plex
When trying to run it I get the error:
+ GROUP=plextmp
+ mkdir -p /config/logs/supervisor
mkdir: cannot create directory ‘/config/logs’: Permission denied
I've checked the container details:
...
"Volumes": {
"/config": "/etc/docker/plex",
"/data": "/tank"
...
"VolumesRW": {
"/config": true,
"/data": true
...
and the directory exists:
# file /etc/docker/plex
/etc/docker/plex: directory
everything seems to be fine.
At first I thought there was a problem with the container itself so I tried other containers as well. I encounter the same problem with each of them. They cannot create folders or files (sometimes not even read them). In the docker documentation ("Managing data in containers") there is a very easy example of creating a new container that simply opens a shell and mounts a volume from the host:
# docker run --rm -it -v /etc/docker/test:/vol ubuntu /bin/bash
Trying to touch a file in /test results in a permission denied error.
Is there anything I am missing?