External Email - Use Caution        

Hello Ellen,

I suspect that you really do not have the system privileges to read/write every subject directory.  I have run into this with other commands that scan multiple subject directories.

Assuming there is one top level directory that contains all the subject directories, and it’s OK for you to try and set/change permissions on those files, then in terminal window you could “cd” to that parent directory,

$ cd <path to top of tree containing all subject subdirectories>

- and then try running the following command,

$ find . -maxdepth 1 -type d -exec chmod 755 {} \; -print

That will try and change the permissions of every subdirectory there such that you can read and write to it.  But if you don’t have permission to access some of those directories, then you will get an error.  You may have to find someone wit, e.g., admin/root. privileges to change the permissions on the subdirectories the chmod command fails on.

- R.

On Sep 9, 2020, at 03:19, Ellen Ji <ellen.ji@bli.uzh.ch> wrote:

       External Email - Use Caution        

Dear experts,

I created a loop for mri_surf2surf so that it would run for 300+ 
subjects. For most of them, it ran successfully. However, it did not 
work for 30 subjects. I then went to investigate one by one and I am 
getting a Permission denied error for some reason. I confirm that 
recon-all has been performed and also that I have read/write/execute 
permissions. See below for the log. Any ideas why this could be 
happening to specific subjects?


            mri_surf2surf \
                --srcsubject fsaverage_sym \
                --trgsubject SPN01_CMH_0079_01 \
                --hemi lh \
                --sval-annot fsaverage_sym/label/lh.500_sym.aparc.annot \
                --tval SPN01_CMH_0079_01/label/lh.500_sym.aparc.annot

Setting mapmethod to nnf

7.1.0

setenv SUBJECTS_DIR /home/eji/projects/spins/preproc/freesurfer/subjects/w0
cd /home/eji/projects/spins/preproc/freesurfer/subjects/w0
mri_surf2surf --srcsubject fsaverage_sym --trgsubject SPN01_CMH_0079_01 
--hemi lh --sval-annot fsaverage_sym/label/lh.500_sym.aparc.annot --tval 
SPN01_CMH_0079_01/label/lh.500_sym.aparc.annot

sysname  Linux
hostname nu2
machine  x86_64
user     eji
srcsubject = fsaverage_sym
srcval     = (null)
srctype    =
trgsubject = SPN01_CMH_0079_01
trgval     = SPN01_CMH_0079_01/label/lh.500_sym.aparc.annot
trgtype    =
srcsurfreg = sphere.reg
trgsurfreg = sphere.reg
srchemi    = lh
trghemi    = lh
frame      = 0
fwhm-in    = 0
fwhm-out   = 0
label-src  = (null)
label-trg  = (null)
OKToRevFaceOrder  = 1
UseDualHemi = 0
Reading source surface reg 
/home/eji/projects/spins/preproc/freesurfer/subjects/w0/fsaverage_sym/surf/lh.sphere.reg
Loading source data
Reading surface file 
/home/eji/projects/spins/preproc/freesurfer/subjects/w0/fsaverage_sym/surf/lh.orig
reading colortable from annotation file...
colortable with 161 entries read (originally 
/scratch/tmpdir.annot2std.28231/seg.1.073.xhemi.ctab)
Reading target surface reg 
/home/eji/projects/spins/preproc/freesurfer/subjects/w0/SPN01_CMH_0079_01/surf/lh.sphere.reg
Done
Using surf2surf_nnfr()
Mapping Source Volume onto Source Subject Surface
surf2surf_nnfr: building source hash (res=16).
Surf2Surf: Forward Loop (123600)

Surf2Surf: Dividing by number of hits (123600)
INFO: nSrcLost = 61776
nTrg121 = 123600, nTrgMulti =     0, MnTrgMultiHits = 0
nSrc121 = 85136, nSrcLost = 61776, nSrcMulti = 78706, MnSrcMultiHits = 
0.488705
Saving target data
Converting to target annot
Saving to target annot SPN01_CMH_0079_01/label/lh.500_sym.aparc.annot
error: Permission denied
error: could not write annot file 
SPN01_CMH_0079_01/label/lh.500_sym.aparc.annot


_______________________________________________
Freesurfer mailing list
Freesurfer@nmr.mgh..harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer