Docker Community Forums

Share and learn in the Docker community.

Chown on NFS mounted directory inside container: Operation not Permitted


I’ve got an HDD that I partly want to use on my host (to backup VMs) as well as a TimeMachine backup disk inside a Docker container. Therefore I’ve created a ZFS dataset tank1/storage/timemachine that’s mounted on /storage/timemachine. I’ve also shared this directory via NFS using /etc/exports:


Inside my Docker host ( I can mount /storage/timemachine and I can e.g. do chown 101000 /storage/timemachine/test.txt (executed as root). But inside a Docker container that has mounted /storage/timemachine (tried both as volume as bind mount) I cannot do a chown 1000 test.txt as I get a “Operation not permitted”. I’ve also tried this with a non-NFS bind mount and than it works fine.

Is there something I can do to be able to use chown on NFS directories inside a Docker container? Or am I missing something?