Fedora CoreOS Container Permissions to Create Directory

78 Views Asked by At

I'm trying to run Plex Media Server on a fcos host. I keep getting a permissions error during launch.

find: ‘/config’: Permission denied
/bin/mkdir: cannot create directory ‘/config/Library’: Permission denied

I've created directories like this on the host:

/var/plex/config
/var/plex/transcode

I've chown'd these with the core user and have set permissions on the plex, config, and transcode folders to 777 (as part of troubleshooting). I've specified in my docker-compose for the PMS server to set the UID and GID to match the user I'm using to launch the container. I've even tried to sudo docker-compose and it doesn't help. Am I missing something with FCOS? I thought /var was supposed to be writable?

EDIT: I updated my volume configuration to use the :Z option. Like so:

volumes:
  - /var/plex/config:/config:Z
  - /var/plex/transcode:/transcode:Z
  - /var/plex/plex-docker/fstab:/etc/fstab:Z

This fixed the problem, but I guess my question is why? Is this just an SELinux thing?

0

There are 0 best solutions below