qsiprep
qsiprep copied to clipboard
qsiprep output owned by root
Dear developers,
thanks for providing qsiprep.
I'm using docker on linux. The output of qsiprep is owned by root. Can this be changed?
In fmriprep, when using the docker option "-u $(id -u)", the output is owned by the user running the docker.
However, when trying similarly to fmriprep, this gives an error with qsiprep: PermissionError: [Errno 13] Permission denied: '/scratch/20210713-130651_41b9d39c-4cf3-4db0-abf0-74ed7c89dbda'
Thank you in advance for any advise.
Kind regards, Stefan.
Hi @treanus, we haven't optimized the user setup for docker since singularity is much more common. Until we have a good fix for this, I think you can docker run --rm -ti -v /my/outputs:/data --entrypoint bash pennbbl/qsiprep:0.14.2
and change the permissions to /data
in that shell.
I believe the error arises because docker is creating a new directory to be mounted to /scratch. If you do
docker run ... -u $(id -u):$(id -g) -v /some/scratch/path:/scratch pennbbl/qsiprep:0.14.2
and /some/scratch/path
does not exist, docker will create it, owned by root.
However, if you create /some/scratch/path
first, it will be mounted with the same uid and gid inside the container.