Hallelujah ! Problem solved! Here's what happened: both tcsh pwd and /bin/pwd give errors when a directory is executable (+x) but not readable (-r). And in my case, the colleague of mine fully opened up $SUBJECTS_DIR for me, but (and this is also how it should be done) only provided me with executable rights for the parent directories. I haven't figured out why recon-all needs to call pwd on these parent directories at all -- I leave that one for the recon-all tcsh gurus :-) My hack was to replace every pwd call in the recon-all script by the built-in bash pwd call (which only needs +x permissions). It's not very pretty, but hey, must of us aren't! To be precise, this is what did it for me (NB: some of the pwd replacements may be unnecessary): diff myrecon-all /opt/freesurfer/bin/recon-all 296c296 < set PWD = "bash -c 'pwd'"; --- > set PWD = pwd; 298c298 < # if ( -e /bin/pwd ) set PWD = /bin/pwd --- > if ( -e /bin/pwd ) set PWD = /bin/pwd 361c361 < set freesurfer_home_true = `$PWD`; --- > set freesurfer_home_true = `pwd`; 382c382 < $PWD >> $ENVF --- > pwd >> $ENVF 3819c3819 < echo "PWD `$PWD`" >> $ErrorFile --- > echo "PWD `pwd`" >> $ErrorFile 3880c3880 < set InVolDir = `$PWD`; --- > set InVolDir = `pwd`; 4943c4943 < setenv FREESURFER_HOME `$PWD`; --- > setenv FREESURFER_HOME `pwd`; Hope this may be of use to anyone encountering the same problem and that this tcsh bin & /bin/pwd problem may be taken into account in future recon-all versions. All the best and thanks a lot for all your time and kind help, Marcel. > >> Hi,
I am new to FS and have encountered a weird problem that I do not know how to solve and did not find any earlier postings on. When I run recon-all on a file in my own home directory everything works normally:
recon-all -subject BIG1026_1 -sd /home/mrphys/marzwi/test -i BIG1026_1.nii.gz -autorecon1 [..]
However, if I run the same command on the same file, except that this file is now located in a directory of a colleague of mine that I certainly have full access to (+r+w+x), I immediately get a 'permission denied' error:
recon-all -subject BIG1026_1 -sd /home/control/marhoo/Projects /BIG/Freesurfer_CorticalThickness -i BIG1026_1.nii.gz -autorecon1 pwd: cannot open directory `../..': Permission denied /bin/pwd: cannot open directory `../..': Permission denied mkdir: cannot create directory `/BIG1026_1': Permission denied [..]
From the error message it seems to me as if FS is trying to access the parent directory (of which I do not have full rights but only -r-w+x)? As this does not make a lot of sense to me I suspect there must be another cause and hope you have any ideas here.
Cheers, Marcel
-- Marcel Zwiers www.ru.nl/donders MR techniques +31-(0)24-3668495 Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen, The Netherlands