This is due to " https://stackoverflow.com/questions/36477636/how-do-i-implement-a-shared-hosting-like-service-with-docker ".
I am trying to configure a bunch of apache-php containers that should have rw for docroot and one single sftp container that should also have rw capability in the same directory. So the plan is to create a shared volume and mount it inside both containers (obviously in different places when it comes to the sftp container). I changed the official launch of php: 7-apache script as follows:
#!/bin/bash set -e
and in fact the two lines of umask confirm that the clamped umask 0002 working correctly. However, when I bash into the container and test it myself, umask returns 022 , and if I create any file, they actually get 644 permissions. Then I can manually umask 0002 and any new file is created with permissions of 664 (and 775 for directories).
In this case, it is very important that both containers (sftp and apache) can read and write to the shared volume. So how do I do this?
docker apache docker-volume ftp shared-hosting
Morpheu5
source share