Not able to change permissions for files and folders created on mounted volumes

I’m trying to use a container with InterSystems IRIS data platform. The container is based on Ubuntu.
I can run the container without problems with a mounted volume bind to the host OS (Windows). I can add, modify or delete files from host OS (Windows) or from within the container (Ubuntu).
My problem starts when I want to put in that shared volume some pieces of the data platform to make them durable. IS IRIS requires that the files belong to certain user/group … I’ve tried to change it but it seems that I cannot change permissions and/or users/groups for folders and files stored in that shared área… is that so or I’m doing anything wrong?

1 Like

It’s true, when you’re running Docker for Windows, even if you shell into a running docker container that has a volume bind mounted from the host, and try to chown or chmod files therein, the command will silently fail (well, silent on the CLI, maybe logs will be generated, I haven’t looked).

I don’t know if that is considered an issue that will be “fixed”; some say it is just a consequence of the lack of direct correspondence between the Windows ACL system and Linux, and therefore Docker for Windows has no real choice but to work this way.

Some options:

  • switch to just copying the information in instead of binding it, if you don’t require it to be “live”
  • or change to a sync solution such as docker-sync.io
  • or avoid Docker for Windows; run a Linux VM and do your docker work inside of that
1 Like