title: Why does docker fail to CHMOD when mounting an NFS volume?
body: <p>My NFS exports look like this:</p>
  <pre><code>/export/plex_transcode *(fsid=1,rw,all_squash,anonuid=65534,anongid=65534,crossmnt)
  /export/plex_database *(fsid=2,rw,all_squash,anonuid=65534,anongid=65534,crossmnt)
  /export/plex_media *(fsid=3,rw,all_squash,anonuid=65534,anongid=65534,crossmnt)
  </code></pre>
  <p>My docker-compose looks like this:</p>
  <pre><code>version: &quot;2.1&quot;
  services:
    plex:
      image: plexinc/pms-docker
      container_name: plex
      environment:
        - TZ=&quot;Canada/Atlantic&quot;
        - PLEX_CLAIM=&quot;xxx&quot;
        - ADVERTISE_IP=&quot;http://xxxx:32400/&quot;
        - ALLOWED_NETWORKS=&quot;192.168.0.0/24,172.20.0.0/16&quot;
      volumes:
        - plex_database:/config
        - plex_transcode:/transcode
        - plex_media:/data
      ports:
        - 32400:32400/tcp
        - 3005:3005/tcp
        - 8324:8324/tcp
        - 32469:32469/tcp
        - 1900:1900/udp
        - 32410:32410/udp
        - 32412:32412/udp
        - 32413:32413/udp
        - 32414:32414/udp
      restart: unless-stopped
  volumes:
    plex_database:
      driver_opts:
        type: &quot;nfs&quot;
        o: &quot;addr=dckr1.local,rw&quot;
        device: &quot;:/export/plex_database&quot;
    plex_transcode:
      driver_opts:
        type: &quot;nfs&quot;
        o: &quot;addr=dckr1.local,rw&quot;
        device: &quot;:/export/plex_transcode&quot;
    plex_media:
      driver_opts:
        type: &quot;nfs&quot;
        o: &quot;addr=dckr1.local,rw&quot;
        device: &quot;:/export/plex_media&quot;
  </code></pre>
  <p>to troubleshoot I can run this as root:</p>
  <pre><code>mount -t nfs4 dckr1.local:/export/plex_media /mnt
  </code></pre>
  <p>and chmod in the /mnt directory just fine.  It's left me kinda scratching my head.</p>
  <p>The error produced reads:</p>
  <blockquote>
  <p>Creating plex ... [1A[2K Creating plex ... [31merror[0m [1B ERROR: for
  plex Cannot create container for service plex: failed to chmod on
  /var/lib/docker/volumes/plex_plex_database/_data: chmod
  /var/lib/docker/volumes/plex_plex_database/_data: operation not
  permitted ERROR: for plex Cannot create container for service plex:
  failed to chmod on /var/lib/docker/volumes/plex_plex_database/_data:
  chmod /var/lib/docker/volumes/plex_plex_database/_data: operation not
  permitted Encountered errors while bringing up the project.</p>
  </blockquote>