Permissions issues with Docker (not obeying umask)

Hello – We’re using Docker to run HeuDiConv, MRIQC, and FMRIPREP, and we’re running into some similar issues that others have posted about regarding permissions and writing out as root. Those prior posts and discussions were super helpful and we can get all three of these programs to write out the files with the appropriate user and group IDs.

docker run -it --rm \
-v /data/projects/srndna/bids:/data:ro \
-v /data/projects/srndna/mriqc:/out \
-u $(id -u):$(id -g) \
poldracklab/mriqc:0.12.1 \
/data /out \
participant --n_cpus 12 --fft-spikes-detector --ica

However, our problem is that the files written by Docker do not obey the umask, and updating the default permissions as per the post below doesn’t seem to work.

So, if one person in our lab creates files with Docker and any of these programs, another person in the lab won’t have the appropriate permissions to edit/manipulate the outputs unless we update the permissions. Is there a workaround for this? Or am I missing something with the umask and setting the default group permissions?

Thanks!
David