If a volume is read/write, then any user of my container can write in this volume.
Actual behavior
Only root of container can write in this volume.
Information
All files are :
-rwxr-xr-x 1 root root 7 Apr 4 09:09 essai.txt
And cannot change this authorization. It’s same problem with virtualbox.
rsync is remaining the best solution ?
It’s big problem for database container
But on another note: in the example I gave, even though it shows only root has permissions, I was able to write using jenkins user. I am not sure why, this also seems wrong. But for now it works.
So somehow it worked for me on "docker for windows"
But now I am having same issue on “boot2docker” with windows 7.
Here is the problem -
Jenkins official docker has jenkins running under user "jenkins"
It is not able to write to any mounted volumes as mounted volumes are read only.
Here is a command that you can try
docker run --name jenkins --privileged=true -t -i --rm -p 49001:8080 -v //c/:/var/jenkins_home/:rw -v /var/run/docker.s
ock:/var/run/docker.sock -v /usr/lib64/libdevmapper.so.1.02:/usr/lib/libdevmapper.so.1.02 -v /usr/bin/docker:/bin/docker -t jenkins
touch: cannot touch /var/jenkins_home/copy_reference_file.log: Permission denied
Can not write to /var/jenkins_home/copy_reference_file.log. Wrong volume permissions?
touch: cannot touch ‘/var/jenkins_home/copy_reference_file.log’: Permission denied
Can not write to /var/jenkins_home/copy_reference_file.log. Wrong volume permissions?