[Docker] Ownership of volume is root - How to change to User:group ?

Recommended Posts


I am using the Official Docker container and have multiple mounted_folders setup, for the sake of debugging i will limit that to one.

The container is launched via docker-compose, the volume is mounted at launch /start and i can access it with the UI and write data in there (read sync a folder), but all files have root:root ownership.

Any idea how to get the ownership of the file within this folder to be the same as the parent mounted folder ?



According to Docker discussions, the volume will have ownership of the user in the container (which seems to be root here), could this be rlsync instead ?

There is a way according to the doc to have this setup with the USER directive in the dockerfile :




version: "2"
    image: resilio/sync:latest
      - "8888:8888"
      - "55555"
      - "./syncdata:/mnt/sync"
      - "./config:/mnt/sync/config"
      - "/mnt/myfolder2:/mnt/mounted_folders/myfolder2"
    restart: always




Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.