qsiprep icon indicating copy to clipboard operation
qsiprep copied to clipboard

qsiprep output owned by root

Open treanus opened this issue 2 years ago • 2 comments

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.

treanus avatar Jul 13 '21 13:07 treanus

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.

mattcieslak avatar Jul 14 '21 16:07 mattcieslak

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.

cookpa avatar Jul 14 '21 18:07 cookpa