Fmriprep: Permissions Error (?) with FreeSurfer Processing and -u Flag in 20.0.6

Created on 26 Apr 2020  路  6Comments  路  Source: nipreps/fmriprep

Using fMRIPrep 20.0.6, via docker (fmriprep-docker) with the -u $UID flag. During at the start of FreeSurfer processing, fMRIPrep crashes with what appears to be a permissions error. No other preceding errors and everything to that point comes out owned by my user account (as desired).

Node: fmriprep_wf.fsdir_run_20200424_173701_c73b53cd_29a6_4755_b77b_ac5e10a68752
Working directory: /tmp/work/fmriprep_wf/fsdir_run_20200424_173701_c73b53cd_29a6_4755_b77b_ac5e10a68752

Node inputs:

derivatives = /out
freesurfer_home = /opt/freesurfer
overwrite_fsaverage = False
spaces = []
subjects_dir = freesurfer
Traceback (most recent call last): File "/usr/local/miniconda/lib/python3.7/site-packages/nipype/pipeline/plugins/multiproc.py", line 344, in _send_procs_to_workers self.procs[jobid].run(updatehash=updatehash) File "/usr/local/miniconda/lib/python3.7/site-packages/nipype/pipeline/engine/nodes.py", line 516, in run result = self._run_interface(execute=True) File "/usr/local/miniconda/lib/python3.7/site-packages/nipype/pipeline/engine/nodes.py", line 635, in _run_interface return self._run_command(execute) File "/usr/local/miniconda/lib/python3.7/site-packages/nipype/pipeline/engine/nodes.py", line 741, in _run_command result = self._interface.run(cwd=outdir) File "/usr/local/miniconda/lib/python3.7/site-packages/nipype/interfaces/base/core.py", line 397, in run runtime = self._run_interface(runtime) File "/usr/local/miniconda/lib/python3.7/site-packages/niworkflows/interfaces/bids.py", line 684, in _run_interface copytree(source, dest) File "/usr/local/miniconda/lib/python3.7/shutil.py", line 359, in copytree raise Error(errors) shutil.Error: [('/opt/freesurfer/subjects/fsaverage/label', '/out/freesurfer/fsaverage/label', "[Errno 1] Operation not permitted: '/out/freesurfer/fsaverage/label'"), ......]

(ellipses added at the end)

bug

Most helpful comment

@oesteban the output directory, in this case ./fmriprep, is remapped to /out within the container, so /out/freesurfer seems correct.

@jrussell9000 did the output folder exist before running the wrapper? this looks similar to https://github.com/poldracklab/fmriprep/issues/2098

in any case, we could add a check to the wrapper warning users about permission issues when mounting non-existing directories.

All 6 comments

can you share the full command you are using? and verify that /out/freesurfer/fsaverage/label is owned by the same UID you are passing in?

The fsaverage folder and contents aren't owned by the UID I'm passing (they're owned by root), which appears to be the problem. My command is below...

fmriprep-docker --fs-license-file ~/license.txt ./BIDS_Master/ ./fmriprep/ participant --ignore fieldmaps --n_cpus 32 -u $UID

@mgxd with that command line (without --fs-subjects-dir), should not the freesurfer folder be pointing to $PWD/fmriprep/freesurfer ?

@oesteban the output directory, in this case ./fmriprep, is remapped to /out within the container, so /out/freesurfer seems correct.

@jrussell9000 did the output folder exist before running the wrapper? this looks similar to https://github.com/poldracklab/fmriprep/issues/2098

in any case, we could add a check to the wrapper warning users about permission issues when mounting non-existing directories.

In this case the output directory structure did not exist prior to starting the wrapper. I'd second a permissions check...I didn't realize I needed to create those directories. I'll create the fmriprep and freesurfer directories (owned by my UID) before running again and update this issue with the results.

This should be fixed in #2106

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jdkent picture jdkent  路  5Comments

manishsaggar1 picture manishsaggar1  路  5Comments

ritcheym picture ritcheym  路  3Comments

ptubiolo37 picture ptubiolo37  路  4Comments

oesteban picture oesteban  路  5Comments