Change permissions for files created by docker daemon service
3
votes
1
answer
4081
views
I'm trying to change the default permissions assigned to files when created by the docker daemon by changing the default
umask
. The docker daemon service runs as root and creates the files with umask
of root. I tried changing the umask
by adding a command to /etc/init.d/docker
and also passed the desired umask(000)
as an option to start-stop-daemon but none of them seem to be working. How can I change the default permissions assigned to files created by docker daemon?
Edit: I am trying to set the default permissions for files and folders created by the docker daemon on the host and not within a container. For instance, if a folder on host machine, mapped within a container, doesn't exist, docker automatically creates the folders and assigns permissions based on default umask(which is that of root).
Asked by dnivra
(41 rep)
Mar 9, 2016, 09:48 AM
Last activity: Apr 21, 2025, 08:06 AM
Last activity: Apr 21, 2025, 08:06 AM