Docker Permission Denied

mindboggle
#1

Hi all,

I am trying to used mindboggle for the first time. I followed the instructions to install the docker container on a Linux machine.

I set the environment variables as this:
HOST=/home/neuroimaging/Documents/ (path where I have the folder example_mri_data)
DOCK=/home/jovyan/work
MAGE=$DOCK/example_mri_data/T1.nii.gz
ID=arno

And ran the command:
sudo docker run --rm -ti -v $HOST:$DOCK nipy/mindboggle $IMAGE --id $ID

However I got this message:
/neurodocker/startup.sh: line 5: /home/jovyan/work/example_mri_data/T1.nii.gz: Permission denied

Why is this happening? Can anyone help me with this?

Thanks in advance!
Ana

0 Likes

#2

That’s odd. What permissions do you have for accessing that image?

0 Likes

#3

I have read and write permissions.

0 Likes

#4

Given that you get the full path to your image (/home/…/T1.nii.gz) your issue shouldn’t be due to the typo above (MAGE=…). I usually run mindboggle in docker without using sudo. Perhaps your read/write permissions are different when using sudo to run mindboggle within a container which in turn must access /home/neuroimaging/…, which doesn’t sound like a user directory to me. Could you try putting the example_mri_data folder in your home directory, changing $HOST accordingly, and giving it another try? Thanks!

0 Likes

#5

I was using sudo because it was the only way to run docker, but now I changed the permissions in the configuration file of docker and I can run without using sudo.
Still, I got the same error. I tried moving example_mri_data folder to different directories but I got always the same result. /home/neuroimaging/… is actually my home directory (my username is neuroimaging).
I also tested on macOS using the HOST=/Users/anacoelho/ but again the same error occurred.

Thanks for you help!

0 Likes

#6

I’m dumbfounded, as I have never run into this problem on linux or macos. Rather than run that docker command, please try “docker run --rm -ti -v $HOST:$DOCK nipy/mindboggle” and to enter the docker container and see if you can access the example_mri_data folder from within the container.

0 Likes

#7

When I do that I can enter the docker and access the example_mri_data folder. I can even run the separate commands for freesurfer, ants and mindboggle.

0 Likes