Hey Eugenio and Eva,

I took a look through the code, and segmentHA_T1.sh ultimately calls a compiled version of segmentSubjectT1_autoEstimateAlveusML.m.
There are a few 'mv * imageDump.mgz' calls, that look like they update the imageDump.mgz file after a transform is applied, but like Eugenio mentioned, all those mv operations should take place in the temp dir, which will be created under the input subject.

I just ran segmentHA_T1.sh using our shared copy of FS 7.3.2, with buildstamp 'freesurfer-linux-centos7_x86_64-7.3.2-20220804-6354275' and was not able to reproduce the error.
If the buildstamps match, then that leads me to believe that the issue has to do with something relating to permissions in the SUBJECTS_DIR.
Is it possible that the subjects are symlinked, with the actual file living somewhere under FREESURFER_HOME? (Although that seems unlikely to be the case given the discussion.)

Best,
Jackson


From: Iglesias Gonzalez, Juan E. <JIGLESIASGONZALEZ@mgh.harvard.edu>
Sent: Friday, December 22, 2023 10:18 AM
To: Freesurfer support list <freesurfer@nmr.mgh.harvard.edu>
Cc: Brouwer, I. (Iman) <i.brouwer2@amsterdamumc.nl>; Gool, J.K. (Jari) <j.gool@amsterdamumc.nl>; Nolan, Jackson <JNOLAN5@mgh.harvard.edu>; Dicamillo, Robert <RDICAMILLO@mgh.harvard.edu>
Subject: Re: [Freesurfer] SUBJECTS_DIR writing permissions to run hippocampal/amygdala subfields
 

Sorry, I missed that detail. I’m pretty sure that the code does not write any files on FREESURFER_HOME, which makes this issue super weird! I’m CCing Jackson and Rob, in case they have any other ideas (if not, I would recommend that you simply use the local copy of FS).

C heers,

/E

 

--

Juan Eugenio Iglesias

http://www.jeiglesias.com

 

From: freesurfer-bounces@nmr.mgh.harvard.edu <freesurfer-bounces@nmr.mgh.harvard.edu> on behalf of Heese, E. van (Eva) <e.vanheese@amsterdamumc.nl>
Date: Friday, December 22, 2023 at 9:56 AM
To: Freesurfer support list <freesurfer@nmr.mgh.harvard.edu>
Cc: Brouwer, I. (Iman) <i.brouwer2@amsterdamumc.nl>, Gool, J.K. (Jari) <j.gool@amsterdamumc.nl>
Subject: Re: [Freesurfer] SUBJECTS_DIR writing permissions to run hippocampal/amygdala subfields

        External Email - Use Caution        

Hi again Juan Eugenio,

 

Thanks for your quick response. I meant to reach out again in our other trail of emails too. Changing the permissions of just the SUBJECTS_DIR does not seem sufficient, because the imagedump permission error still pops up. With FREESURFER_HOME writing permissions the error does not come up, and on a first glance the segmentations issues (i.e. missing tail/mirroring of the atlas) are also resolved. Is it possible that the subfield functionality relies on writing permissions in FREESURFER_HOME too?

 

Best,

Eva

 

Van: freesurfer-bounces@nmr.mgh.harvard.edu <freesurfer-bounces@nmr.mgh.harvard.edu> Namens Iglesias Gonzalez, Juan E.
Verzonden: vrijdag 22 december 2023 15:28
Aan: Freesurfer support list <freesurfer@nmr.mgh.harvard.edu>
CC: Brouwer, I. (Iman) <i.brouwer2@amsterdamumc.nl>; Gool, J.K. (Jari) <j.gool@amsterdamumc.nl>
Onderwerp: Re: [Freesurfer] SUBJECTS_DIR writing permissions to run hippocampal/amygdala subfields

 

Dear Eva,

The subfield temporary directory is under SUBJECTS_DIR, not FREESURFER_HOME. So you only need SUBJECTS_DIR to be local.

Cheers,

/Eugenio

 

--

Juan Eugenio Iglesias

MailScanner has detected a possible fraud attempt from "secure-web.cisco.com" claiming to be http://www.jeiglesias.com

 

From: freesurfer-bounces@nmr.mgh.harvard.edu <freesurfer-bounces@nmr.mgh.harvard.edu> on behalf of Heese, E. van (Eva) <e.vanheese@amsterdamumc.nl>
Date: Friday, December 22, 2023 at 9:24 AM
To: freesurfer@nmr.mgh.harvard.edu <freesurfer@nmr.mgh.harvard.edu>
Cc: Brouwer, I. (Iman) <i.brouwer2@amsterdamumc.nl>, Gool, J.K. (Jari) <j.gool@amsterdamumc.nl>
Subject: [Freesurfer] SUBJECTS_DIR writing permissions to run hippocampal/amygdala subfields

        External Email - Use Caution        

Dear FreeSurfer support team,

 

I am running into some issues regarding the mandatory SUBJECTS_DIR writing permissions when running the hippocampal and amygdala subfields segmentation functionality (segmentHA_T1.sh).

 

I am using FreeSurfer 7.3.2 on a slurm server. We have a shared FreeSurfer installation which is the FREESURFER_HOME location for many users, hence the absence of writing permissions. When running the subfield segmentations, I get this error:

mv: replace 'imageDump.mgz', overriding mode 0444 (r--r--r--)?

Even when overriding this (by typing y), the error results into issues with the segmentations because it cannot access the imageDump.mgz file and thus cannot use it as the starting template for the segmentation. This has been suggested and confirmed by Philipp Saemann and Juan Eugenio Iglesias in separate correspondence.

 

The short-term solution offered by our server admin was to make a local copy of the FreeSurfer installation (to be able to get writing permissions) and set the FREESURFER_HOME variable to this local copy. This seems a bit devious, considering many FreeSurfer users might face a similar issue on shared clusters without writing permissions. Is there another workaround possible?

 

Thanks for your help.

 

Best wishes,

Eva van Heese

______________________________________________________
AmsterdamUMC disclaimer : MailScanner has detected a possible fraud attempt from "secure-web.cisco.com" claiming to be www.amsterdamumc.org/disclaimers