External Email - Use Caution
Hello Mudathir, Your account needs admin/sudo privileges in order to write files under /Applications. If you made the first account on the machine when it was new and powered up after taking it out of the box, then at the terminal all you should need to do is preface commands with “sudo”. If you use the Finder, then it will ask you to authenticate via a popup window, e.g., when installing software. Once you authenticate via the terminal or via the Finder window and the system accepts your password, then by default your admin permissions will be cached for a certain period of time. One way to test that is to open a terminal window and do, $ sudo touch /Applications foo<output deleted>Password: If that succeeds, then you should be able to remove the file w/o typing sudo while your credentials are still cached,$ rm /Applications/foo With admin/sudo privileges, the 7.1..1 Mac package installer program,https://secure-web.cisco.com/1xtJzx0lQIrKf7ZCl0ntd1jilGKonbJiHvRDb7FRZbR4FJp... - can be used to install the freesurfer 7.1.1 distribution under /Applications/freesurfer/7.1.1. The freesurfer 6 or freesurfer 7 *.pkg files should set all the permissions to be correct on the freesurfer files.
You can re-home SUBJECTS_DIR in the shell environment (this example assumes the pkg file installed it as /Applications/freesurfer/7.1.1) $ bash$ export FREESURFER_HOME=/Applications/freesurfer/7.1.1$ source $FREESURFER_HOME/SetUpFreeSurfer.sh -------- freesurfer-darwin-macOS-7.1.1-20200811-8b40551 -------- Setting up environment for FreeSurfer/FS-FAST (and FSL) FREESURFER_HOME /Applications/freesurfer/7.1.1 FSFAST_HOME /Applications/freesurfer/7.1.1/fsfast FSF_OUTPUT_FORMAT nii.gz SUBJECTS_DIR /Applications/freesurfer/7.1.1/subjects MNI_DIR /Applications/freesurfer/7..1.1/mni You can change the setting of SUBJECTS_DIR to point to a directory where you always have write permission (do not need to authenticate with sudo), e.g., your home directory, $ mkdir $HOME/subjects$ export SUBJECTS_DIR=$HOME/subjects If you have at least ~3G of free space, you could just copy the contents of the ./subjects dir from the freesurfer distribution into $HOME/subjects, $ cd $HOME$ pwd/Users/<username>$ ( cd /Applications/freesurfer/7.1.1; tar cpf - subjects) | tar xpf - $ ls subjectsREADME* cvs_avg35/ fsaverage3/ fsaverage6/ rh.EC_average/ V1_average/ cvs_avg35_inMNI152/ fsaverage4/ fsaverage_sym/ sample-001.mgz* bert/ fsaverage/ fsaverage5/ lh.EC_average/ sample-002.mgz*
You can always start again from scratch after processing files by removing ./subejcts under your $HOME directory and copy the files over again via the tar command (w/o touching the installed freesurfer distribution). - R.
On Apr 18, 2021, at 04:41, バキット・ムダシル <m-bakhit@fmu.ac.jp> wrote: External Email - Use Caution Thanks Douglas. Here what happened. I did as you said and moved the $SUBJECTS_DIR out of the /Applications folder to somewhere in my home folder. Still the same error. But when I did ran the command through freesurfer 6 it worked fine even in the /Applications folder. Also, a freesurfer 7 in an Ubuntu virtual machine worked fine. So I think it has to do with something in the freesurfer 7.1.1 version I have in my computer.I would like to add a question if you don’t mind. Since I found here in the forum that the average is in the MNI305 space, how I can make an average of my sample in MNI152 space from the start?ThanksMudathirOn Apr 14, 2021, at 23:26, Douglas N. Greve <dgreve@MGH.HARVARD.EDU> wrote:It looks like you do there, but downstream you might not. In general, macs don't like to give you permission in the apps folder. Try pointer your SUBJECTS_DIR to another location, eg, in your home directoryOn 4/6/2021 8:44 PM, バキット・ムダシル wrote: External Email - Use Caution I Think I have a permission. I ran chmod -R u+rwX to make sure, but the error was the same. Can you confirm from below please?\mudathirbakhit$ ls -l $FREESURFER_HOME/total 568drwxr-xr-x 39 mudathirbakhit admin 1248 Mar 18 20:24 6..0.0-rwxr-xr-x 1 mudathirbakhit wheel 3240 Aug 12 2020 ASegStatsLUT.txt-rwxr-xr-x 1 mudathirbakhit wheel 47514 Aug 12 2020 DefectLUT.txt-rwxr-xr-x@ 1 mudathirbakhit wheel 89181 Aug 12 2020 FreeSurferColorLUT.txt-rwxr-xr-x 1 mudathirbakhit wheel 18152 Aug 12 2020 FreeSurferEnv.csh-rwxr-xr-x 1 mudathirbakhit wheel 18223 Aug 12 2020 FreeSurferEnv.shdrwxrwxr-x@ 3 mudathirbakhit wheel 96 Mar 16 13:11 Freeview.appdrwxr-xr-x 3 mudathirbakhit wheel 96 Mar 17 10:06 Freeview_backup.app-rwxr-xr-x@ 1 mudathirbakhit wheel 28381 Aug 12 2020 SegmentNoLUT.txt-rwxr-xr-x 1 mudathirbakhit wheel 1358 Aug 12 2020 SetUpFreeSurfer.csh-rwxr-xr-x 1 mudathirbakhit wheel 1350 Aug 12 2020 SetUpFreeSurfer.sh-rwxr-xr-x@ 1 mudathirbakhit wheel 4104 Aug 12 2020 Simple_surface_labels2009.txt-rwxr-xr-x 1 mudathirbakhit wheel 25476 Aug 12 2020 WMParcStatsLUT.txt-rw-r--r--@ 1 mudathirbakhit staff 2718 Apr 1 14:13 aparc+aseg.txtdrwxr-xr-x 126 mudathirbakhit wheel 4032 Apr 7 07:22 averagedrwxr-xr-x 766 mudathirbakhit wheel 24512 Mar 17 10:06 bin-rwxr-xr-x 1 mudathirbakhit wheel 47 Aug 12 2020 build-stamp.txtdrwxr-xr-x 3 mudathirbakhit wheel 96 Mar 17 19:35 colordrwxr-xr-x 3 mudathirbakhit wheel 96 Aug 12 2020 diffusiondrwxr-xr-x 37 mudathirbakhit wheel 1184 Aug 12 2020 docsdrwxr-xr-x 3 mudathirbakhit wheel 96 Aug 12 2020 etcdrwxr-xr-x 5 mudathirbakhit wheel 160 Aug 12 2020 fsafddrwxr-xr-x 6 mudathirbakhit wheel 192 Apr 7 07:22 fsfastdrwxr-xr-x 6 mudathirbakhit wheel 192 Apr 7 07:22 lib-rw-r--r--@ 1 mudathirbakhit wheel 55 Feb 17 09:40 license.txtdrwxr-xr-x 185 mudathirbakhit wheel 5920 Apr 7 07:22 matlabdrwxr-xr-x 11 mudathirbakhit wheel 352 Apr 7 07:22 mni-rw-r--r--@ 1 mudathirbakhit staff 641 Apr 6 16:13 par.txtdrwxr-xr-x 8 mudathirbakhit wheel 256 Apr 7 07:22 pythondrwxr-xr-x 3 mudathirbakhit wheel 96 Aug 12 2020 sessions-rwxr-xr-x 1 mudathirbakhit wheel 134 Aug 12 2020 sources.csh-rwxr-xr-x 1 mudathirbakhit wheel 132 Aug 12 2020 sources.shdrwxr-xr-x+ 42 mudathirbakhit wheel 1344 Apr 7 09:37 subjects-rwxr-xr-x 1 mudathirbakhit wheel 1681 Aug 12 2020 tkmeditParcColorsCMAdrwxr-xr-x 38 mudathirbakhit wheel 1216 Apr 7 07:22 trctrain-rwxr-xr-x 1 mudathirbakhit wheel 972 Aug 12 2020 uninstall.shOn Apr 6, 2021, at 22:30, Douglas N. Greve <dgreve@MGH.HARVARD.EDU> wrote:Do you have write permissions to/Applications/freesurfer/subjectsOf not on a macOn 4/6/2021 6:39 AM, バキット・ムダシル wrote: External Email - Use CautionHi,I am trying to make an average subject but when the process reaches mris_average_surface it fails as seen below.My command was as follow:make_average_subject --out avgsubject --subjects spl_01 spl_02 spl_03 spl_04 spl_05 spl_06 spl_07 spl_08 spl_09 spl_10Can you please guide me to solve this issue.ThanksMudathir############################################@# Making average lh.white surface ---------------------Tue Apr 6 19:23:39 JST 2021/Applications/freesurfer/subjects/avgsubjectmris_make_average_surface -i 7 -o white -sdir-out /Applications/freesurfer/subjects lh white sphere.reg avgsubject spl_01 spl_02 spl_03 spl_04 spl_05 spl_06 spl_07 spl_08 spl_09 spl_10reading vertex positions from white...---------------------------------------------------hemi = lhavg_surf_name = whitecanon_surf_name = sphere.regout_sname = avgsubjectxform = talairach.xfm---------------------------------------------------Is a directoryIs a directoryERROR: creating directory /ERROR: creating directory /Applications/freesurfer/subjects/avgsubject/surfmris_average_surface failedERROR: make_average_surface#################################################_______________________________________________Freesurfer mailing listFreesurfer@nmr.mgh.harvard.eduMailScanner has detected a possible fraud attempt from "secure-web.cisco..com" claiming to be https://secure-web.cisco.com/188o71fPj5Qr_j5Mfrzogt2krsKPOefJ8asGD0y8lpHnLIB... mailing listFreesurfer@nmr.mgh.harvard.eduMailScanner has detected a possible fraud attempt from "secure-web.cisco.com" claiming to be https://secure-web.cisco.com/1hlFCV0MUrh_jtrWBZlJB7SU1uXzpdoDFwAz7j1imIALWOP... Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu MailScanner has detected a possible fraud attempt from "secure-web.cisco.com" claiming to be https://secure-web.cisco.com/188o71fPj5Qr_j5Mfrzogt2krsKPOefJ8asGD0y8lpHnLIB... mailing listFreesurfer@nmr.mgh.harvard.eduhttps://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer________________... mailing listFreesurfer@nmr.mgh.harvard.eduhttps://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
freesurfer@nmr.mgh.harvard.edu