Docker Community Forums

Share and learn in the Docker community.

Docker container creating directories owned by root, I need them owned by 1000:1000

(Thecreatorzone) #1

So, I’m trying to get into creating docker images and I managed to get one going. It was qBittorrent, everything went fine until it started downloading files. All of qBits’ directories are owned by 1000:1000 but as soon as it starts downloading a file, my docker-host machine says that the file folder is owned by root:root . How can I make sure that everything the container creates is owned by 1000:1000 ? I need it to be owned by that because other Docker containers, such as Radarr, need to access the files to import them and right now I’m getting permissions errors. I’ve tried doing a chown -r and setgid on the host machine but the files keep getting created and owned by root…I’m open to all suggestions :slight_smile: Thanks!

My Dockerfile:

(Accetto) #2

How do you start your container? Do you use named volumes or bind mounts for your data? Maybe re-check the Manage Data in Docker part of documentation. It could be an “issue” while using bind mounts.