Zeke,

I created another directory named "volumetric" and put my data under it.
To final check before running the recon-all, here is the info from terminal:
-------- freesurfer-Linux-centos6_x86_64-stable-pub-v5.3.0 --------
Setting up environment for FreeSurfer/FS-FAST (and FSL)
FREESURFER_HOME   /usr/local/freesurfer
FSFAST_HOME       /usr/local/freesurfer/fsfast
FSF_OUTPUT_FORMAT nii.gz
SUBJECTS_DIR      /usr/local/freesurfer/subjects
MNI_DIR           /usr/local/freesurfer/mni
ubuntu:~> cd /volumetric
ubuntu:/volumetric> ls
Case018  Case022

 

and I'm going to run this:

#!/bin/tcsh

clear
cd  /volumetric
ln -s /usr/local/freesurfer/subjects/fsaverage

recon-all -i /volumetric/Case018/case018_tp2/22-1.dcm -subject case018_tp2 -all


On Fri, Sep 19, 2014 at 1:24 PM, <zkaufman@nmr.mgh.harvard.edu> wrote:
Mahmoud,

If I recall correctly, your on a virtual machine with the /mnt/hgfs/mydata
directory being a shared directory, and you werent able to write to it
when running recon-all.

So, what you want to do is create another directory within your virtual
machine that holds your subjects data. You will still need the
$FREESURFER_HOME/subjects directory because that directory contains files
required by recon-all, so you will have a separate directory which
contains your subjects.

You should not be creating symlinks or anything like that.

Just restore the fsaverage directory from the link I sent you back into
$FREESURFER_HOME/subjects, put your subject data somewhere else in the VM,
and run recon-all with the correct arguments.

-Zeke


> yes, that is true. If it's already there the symlink will fail. You
> should be able to rm it if it is there an incorrect (or leave it if it is
> there and correct)
> On Fri, 19 Sep 2014, Mahmoud wrote:
>
>> Bruce and Zeke,
>> Thank you so much for your advice.
>> The last question before running the recon again. if I say:
>> cd  /mnt/hgfs/mydata
>> ln -s /usr/local/freesurfer/subjects/fsaverage
>>
>> It means that I shouldn't already have the fsaverage under /mydata
>> directory, right ?
>>
>> Mahmoud
>>
>> On Fri, Sep 19, 2014 at 12:09 PM, Bruce Fischl
>> <fischl@nmr.mgh.harvard.edu>
>> wrote:
>>       the easiest thing to do is:
>>
>>       cd  /mnt/hgfs/mydata
>>       ln -s /usr/local/freesurfer/subjects/fsaverage
>>
>>
>>       then you don't have to worry about source and target. It will
>>       implicitly create the symlink in $PWD
>>
>>       cheers
>>       Bruce
>>       On Fri, 19 Sep 2014, Mahmoud wrote:
>>
>>             Bruce,
>>
>>             By "symlink from your /mnt/hgfs/mydata/fsaverage to
>>             /usr/local/freesurfer/subjects/fsaverage" you mean
>>             "ln -s
>>             /mnt/hgfs/mydata/fsaverage 
>>             /usr/local/freesurfer/subjects/fsaverage" ?
>>             which fsaverage is the target ?
>>
>>             Thanks,
>>             Mahmoud
>>
>>             On Fri, Sep 19, 2014 at 9:50 AM, Mahmoud
>>             <zeydabadi@gmail.com> wrote:
>>             Â      Bruce,
>>             Thank you for your follow up and advice. Please let
>>             me know:
>>             1- How to download the fsaverage again?
>>             2- should I do the symlink manually or it will be
>>             done by recon-all
>>             later ?
>>             3- What steps should I take before running the
>>             recon-all -all ? should
>>             I create any specific directory? set any permission
>>             ?
>>
>>             Best,
>>             Mahmoud
>>
>>             On Fri, Sep 19, 2014 at 9:41 AM, Bruce Fischl
>>             <fischl@nmr.mgh.harvard.edu> wrote:
>>             Â      yes, you symlinked it to itself which is why
>>             you are
>>             Â      getting the infinite recursion error. You need
>>             to delete
>>             Â      /usr/local/freesurfer/subjects/fsaverage
>>
>>             Â      and download the fsaverage dir again, put it
>>             in that
>>             Â      directory, then symlink from your
>>             Â      /mnt/hgfs/mydata/fsaverage to
>>             Â      /usr/local/freesurfer/subjects/fsaverage
>>
>>             Â      cheers
>>             Â      Bruce
>>             Â      On Fri, 19 Sep 2014, Mahmoud wrote:
>>
>>             Â            Bruce,
>>
>>             Â            I already had my data in a shared folder
>>             Â            (/mnt/hgfs/mydata) but I got the
>>             Â            permission error the same point that I
>>             got the
>>             Â            symlink error lastly. So, I
>>             Â            tought that might be due to something
>>             related
>>             Â            to shared directory.
>>             Â            Then I copied my subjects under the
>>             Â            $SUBJECTS_DIR but got the symlink error.
>>
>>             Â            running ls -l
>>             /usr/local/freesurfer/subjects
>>             Â            /fsaverage  shows me this:
>>
>>             Â            lrwxrwxrwx 1 mahmoud mahmoud 40 Sep 18
>>             20:23
>>             Â            /usr/local/freesurfer/subjects/fsaverage
>>             ->
>>             Â            /usr/local/freesurfer/subjects/fsaverage
>>
>>             Â            Thank you,
>>             Â            Mahmoud
>>
>>
>>             Â            On Fri, Sep 19, 2014 at 9:23 AM, Bruce
>>             Fischl
>>             Â            <fischl@nmr.mgh.harvard.edu>
>>             Â            wrote:
>>             Â                  the  directory
>>             Â            /usr/local/freesurfer/subjects is for
>>             subjects
>>             Â                  that we distribute and NOT where
>>             you
>>             Â            should be putting your
>>             Â                  subject data. Is that what you
>> are
>>             Â            doing? You may have
>>             Â                  overwritten the fsaverage dir
>>             there. Can
>>             Â            you run:
>>
>>             Â                  ls -l
>>             Â            /usr/local/freesurfer/subjects/fsaverage
>>
>>             Â                  and send us the results?
>>
>>             Â                  you should create a directory
>>             elsewhere
>>             Â            with your subject data
>>             Â                  and point SUBJECTS_DIR at it
>>
>>             Â                  cheers
>>             Â                  Bruce
>>
>>             Â                  On Fri, 19 Sep 2014, Mahmoud
>>             wrote:
>>
>>             Â                        Bruce,
>>
>>             Â                        Here is the info when I
>> open
>>             a new
>>             Â            terminal:
>>
>>             Â                        --------
>>             Â                       
>>             Â           
>>             freesurfer-Linux-centos6_x86_64-stable-pub-v5.3.0
>>             Â                        --------
>>             Â                        Setting up environment
>> for
>>             Â            FreeSurfer/FS-FAST (and
>>             Â                        FSL)
>>             Â                        FREESURFER_HOME  
>>             Â            /usr/local/freesurfer
>>             Â                        FSFAST_HOME      
>>             Â            /usr/local/freesurfer/fsfast
>>             Â                        FSF_OUTPUT_FORMAT nii.gz
>>             Â                        SUBJECTS_DIR     
>>             Â            /usr/local/freesurfer/subjects
>>             Â                       
>> MNI_DIR          
>>             Â            /usr/local/freesurfer/mni
>>             Â                        ubuntu:~>
>>
>>             Â                        On Fri, Sep 19, 2014 at
>> 8:56
>>             AM,
>>             Â            Bruce Fischl
>>             Â                       
>> <fischl@nmr.mgh.harvard.edu>
>>             Â                        wrote:
>>             Â                              can you tell us
>> what
>>             your
>>             Â            FREESURFER_HOME is
>>             Â                        and what your
>>             Â                              SUBJECTS_DIR
>> is? You
>>             will
>>             Â            need to remove the
>>             Â                        broken link
>>             Â                              probably
>>
>>             Â                              On Fri, 19 Sep
>> 2014,
>>             Mahmoud
>>             Â            wrote:
>>
>>             Â                                    Hi
>> Bruce,
>>
>>             Â                                   
>> Actually I
>>             couldn't.
>>             Â            It says: ls: cannot
>>             Â                        access
>>             Â                                   
>>             Â                       
>>             Â           
>>             /usr/local/freesurfer/subjects/fsaverage: Too
>>             Â            many
>>             Â                                    levels
>> of
>>             symbolic
>>             Â            links
>>             Â                                    And
>> even I
>>             couldn't cd
>>             Â            to fsaverage !
>>             Â                                    In
>> fact there is
>>             no
>>             Â            directory  under
>>             Â                        SUBJETCS_DIR
>>             Â                                    named
>> fsaverage,
>>             it
>>             Â            seems
>>             Â                                    the
>> fsaverage
>>             under
>>             Â            SUBJETCS_DIR is just
>>             Â                        a broken
>>             Â                                    link,
>> and I have
>>             no
>>             Â            idea
>>             Â                                    why
>> the the link
>>             is
>>             Â            broken and how to
>>             Â                        fix it.
>>             Â                                    Any
>> help would
>>             be
>>             Â            highly appreciated !
>>
>>             Â                                    Thank
>> you,
>>             Â                                   
>> Mahmoud
>>
>>
>>             Â                                    On
>> Fri, Sep 19,
>>             2014
>>             Â            at 8:21 AM, Bruce
>>             Â                        Fischl
>>             Â                                   
>>             Â            <fischl@nmr.mgh.harvard.edu>
>>             Â                                    wrote:
>>             Â                                       
>>   Hi Mahmoud
>>
>>             Â                                       
>>   were you
>>             able to
>>             Â            create a symlink
>>             Â                        to fsaverage
>>             Â                                    in
>> your
>>             Â                                       
>>  
>>             SUBJECTS_DIR? If
>>             Â            not, that is the
>>             Â                        reason for
>>             Â                                    this
>> error
>>             Â                                       
>>   Bruce
>>
>>             Â                                       
>>   On Thu, 18
>>             Sep
>>             Â            2014, Mahmoud
>>             Â                        wrote:
>>
>>             Â                                       
>>         Dear
>>             all,
>>
>>             Â                                       
>>        
>>             After
>>             Â            running "recon-all -i
>>             Â                                       
>>        
>>             Â                                   
>>             Â                       
>>             Â           
>>             $SUBJECTS_DIR/Case018/case018_tp2/22-1.dcm
>>             Â                                       
>>        
>>             -subject
>>             Â            case018_tp2 -all"
>>             Â                        I'm always
>>             Â                                   
>> getting the
>>             Â                                       
>>        
>>             following
>>             Â            error and really
>>             Â                                       
>>        
>>             don't know
>>             Â            how to fix. 
>>
>>             Â                                       
>>        
>>             Could
>>             Â            anybody please help
>>             Â                        me. The
>>             Â                                   
>> recon-all.log
>>             file
>>             Â                                       
>>         is
>>             Â            attached.
>>
>>             Â                                       
>>        
>>             Thank you,
>>             Â                                       
>>        
>>             Mahmoud
>>
>>             Â                                       
>>        
>>             Reporting
>>             Â            on  70
>>             Â                        segmentations
>>             Â                                       
>>        
>>             Â            mri_segstats done
>>             Â                                       
>>        
>>             Â                                   
>>             Â                       
>>             Â           
>>             /usr/local/freesurfer/subjects/case018_tp2/label
>>             Â                                       
>>        
>>             Â                                   
>>             Â                       
>>             Â           
>>             #--------------------------------------------
>>             Â                                       
>>         #@#
>>             BA
>>             Â            Labels lh Thu Sep 18
>>             Â                        20:23:27 EDT
>>             Â                                    2014
>>             Â                                       
>>        
>>             INFO:
>>             Â            fsaverage subject does
>>             Â                        not exist
>>             Â                                    in
>>             Â                                       
>>        
>>             Â            SUBJECTS_DIR
>>             Â                                       
>>        
>>             INFO:
>>             Â            Creating symlink to
>>             Â                        fsaverage
>>             Â                                   
>> subject...
>>
>>             Â                                       
>>          cd
>>             Â                       
>>             /usr/local/freesurfer/subjects; ln
>>             Â                                    -s
>>             Â                                       
>>        
>>             Â                                   
>>             Â                       
>>             Â           
>>             /usr/local/freesurfer/subjects/fsaverage; cd
>>             Â            - 
>>
>>
>>             Â                                       
>>        
>>             Â             mri_label2label
>>             Â                        --srcsubject fsaverage
>>             Â                                   
>> --srclabel
>>             Â                                       
>>        
>>             Â                                   
>>             Â                       
>>             Â           
>>             /usr/local/freesurfer/subjects/fsaverage/label/lh.BA1.label
>>             Â                                       
>>        
>>             Â            --trgsubject
>>             Â                                       
>>        
>>             Â            case018_tp2 --trglabel
>>             Â                        ./lh.BA1.label
>>             Â                                    --hemi
>> lh
>>             Â                                       
>>        
>>             Â            --regmethod surface 
>>
>>             Â                                       
>>         Too
>>             many
>>             Â            levels of symbolic
>>             Â                        links
>>             Â                                       
>>        
>>             Â            mri_label2label: could not
>>             Â                        open label
>>             Â                                    file
>>             Â                                       
>>        
>>             Â                                   
>>             Â                       
>>             Â           
>>             /usr/local/freesurfer/subjects/fsaverage/label/lh.BA1.label
>>
>>             Â                                       
>>        
>>             srclabel =
>>             Â                                       
>>        
>>             Â                                   
>>             Â                       
>>             Â           
>>             /usr/local/freesurfer/subjects/fsaverage/label/lh.BA1.label
>>             Â                                       
>>        
>>             srcsubject
>>             Â            = fsaverage
>>             Â                                       
>>        
>>             trgsubject
>>             Â            = case018_tp2
>>             Â                                       
>>        
>>             trglabel =
>>             Â            ./lh.BA1.label
>>             Â                                       
>>        
>>             regmethod
>>             Â            = surface
>>
>>             Â                                       
>>        
>>             srchemi =
>>             Â            lh
>>             Â                                       
>>        
>>             trghemi =
>>             Â            lh
>>             Â                                       
>>        
>>             trgsurface
>>             Â            = white
>>             Â                                       
>>        
>>             srcsurfreg
>>             Â            = sphere.reg
>>             Â                                       
>>        
>>             trgsurfreg
>>             Â            = sphere.reg
>>             Â                                       
>>        
>>             usehash =
>>             Â            1
>>             Â                                       
>>         Use
>>             Â            ProjAbs  = 0, 0
>>             Â                                       
>>         Use
>>             Â            ProjFrac = 0, 0
>>             Â                                       
>>        
>>             DoPaint 0
>>
>>             Â                                       
>>        
>>             Â            SUBJECTS_DIR  
>>             Â                                   
>>             Â             /usr/local/freesurfer/subjects
>>             Â                                       
>>        
>>             Â            FREESURFER_HOME
>>             Â                        /usr/local/freesurfer
>>             Â                                       
>>        
>>             Loading
>>             Â            source label.
>>             Â                                       
>>        
>>             Invalid
>>             Â            argument
>>             Â                                       
>>        
>>             ERROR
>>             Â            reading
>>             Â                                       
>>        
>>             Â                                   
>>             Â                       
>>             Â           
>>             /usr/local/freesurfer/subjects/fsaverage/label/lh.BA1.label
>>             Â                                       
>>        
>>             Linux
>>             Â            ubuntu
>>             Â                        3.13.0-35-generic
>>             Â                                   
>> #62-Ubuntu SMP
>>             Fri
>>             Â                                       
>>         Aug
>>             15
>>             Â            01:58:42 UTC 2014
>>             Â                                       
>>        
>>             x86_64
>>             Â            x86_64 x86_64
>>             Â                        GNU/Linux
>>
>>             Â                                       
>>        
>>             recon-all
>>             Â            -s case018_tp2
>>             Â                        exited with
>>             Â                                    ERRORS
>> at Thu
>>             Â                                       
>>         Sep
>>             18
>>             Â            20:23:27 EDT 2014
>>
>>             Â                                       
>>         For
>>             more
>>             Â            details, see the
>>             Â                        log file
>>             Â                                       
>>        
>>             Â                                   
>>             Â                       
>>             Â           
>>             /usr/local/freesurfer/subjects/case018_tp2/scripts/recon-all.log
>>
>>
>>             Â                                   
>>             Â                       
>>             Â           
>>             _______________________________________________
>>             Â                                   
>> Freesurfer
>>             mailing
>>             Â            list
>>             Â                                   
>>             Â            Freesurfer@nmr.mgh.harvard.edu
>>             Â                                   
>>             Â                       
>>             Â           
>>             https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
>>
>>
>>             Â                                    The
>> information
>>             in
>>             Â            this e-mail is
>>             Â                        intended only for
>>             Â                                    the
>> person to
>>             whom
>>             Â                                    it is
>>             Â                                   
>> addressed. If
>>             you
>>             Â            believe this e-mail
>>             Â                        was sent to
>>             Â                                    you in
>> error and
>>             the
>>             Â                                    e-mail
>>             Â                                   
>> contains patient
>>             Â            information, please
>>             Â                        contact the
>>             Â                                   
>> Partners
>>             Compliance
>>             Â                                   
>> HelpLine at
>>             Â                                   
>>             Â            http://www.partners.org/complianceline .
>>             Â                        If the
>>             Â                                    e-mail
>> was sent
>>             to you
>>             Â                                    in
>> error
>>             Â                                    but
>> does not
>>             contain
>>             Â            patient
>>             Â                        information, please
>>             Â                                   
>> contact the
>>             sender
>>             Â                                    and
>> properly
>>             Â                                   
>> dispose of the
>>             e-mail.
>>
>>
>>
>>
>>             Â                       
>>             Â           
>>             _______________________________________________
>>             Â                        Freesurfer mailing list
>>             Â                       
>>             Freesurfer@nmr.mgh.harvard.edu
>>             Â                       
>>             Â           
>>             https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
>>
>>
>>             Â                        The information in this
>>             e-mail is
>>             Â            intended only for
>>             Â                        the person to whom
>>             Â                        it is
>>             Â                        addressed. If you
>> believe
>>             this
>>             Â            e-mail was sent to
>>             Â                        you in error and the
>>             Â                        e-mail
>>             Â                        contains patient
>>             information,
>>             Â            please contact the
>>             Â                        Partners Compliance
>>             Â                        HelpLine at
>>             Â                       
>>             Â            http://www.partners.org/complianceline .
>>             If
>>             Â            the
>>             Â                        e-mail was sent to you
>>             Â                        in error
>>             Â                        but does not contain
>> patient
>>             Â            information, please
>>             Â                        contact the sender
>>             Â                        and properly
>>             Â                        dispose of the e-mail.
>>
>>
>>
>>
>>             Â           
>>             _______________________________________________
>>             Â            Freesurfer mailing list
>>             Â            Freesurfer@nmr.mgh.harvard.edu
>>             Â           
>>             https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
>>
>>
>>             Â            The information in this e-mail is
>>             intended
>>             Â            only for the person to whom
>>             Â            it is
>>             Â            addressed. If you believe this e-mail
>>             was sent
>>             Â            to you in error and the
>>             Â            e-mail
>>             Â            contains patient information, please
>>             contact
>>             Â            the Partners Compliance
>>             Â            HelpLine at
>>             Â            http://www.partners.org/complianceline .
>>             If
>>             Â            the e-mail was sent to you
>>             Â            in error
>>             Â            but does not contain patient
>>             information,
>>             Â            please contact the sender
>>             Â            and properly
>>             Â            dispose of the e-mail.
>>
>>
>>
>>
>>             _______________________________________________
>>             Freesurfer mailing list
>>             Freesurfer@nmr.mgh.harvard.edu
>>             https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
>>
>>
>>             The information in this e-mail is intended only for
>>             the person
>>             to whom it is
>>             addressed. If you believe this e-mail was sent to
>>             you in error
>>             and the e-mail
>>             contains patient information, please contact the
>>             Partners
>>             Compliance HelpLine at
>>             http://www.partners.org/complianceline . If the
>>             e-mail was sent
>>             to you in error
>>             but does not contain patient information, please
>>             contact the
>>             sender and properly
>>             dispose of the e-mail.
>>
>>
>>
>>
>>
>> _______________________________________________
>> Freesurfer mailing list
>> Freesurfer@nmr.mgh.harvard.edu
>> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
>>
>>
>> The information in this e-mail is intended only for the person to whom
>> it is
>> addressed. If you believe this e-mail was sent to you in error and the
>> e-mail
>> contains patient information, please contact the Partners Compliance
>> HelpLine at
>> http://www.partners.org/complianceline . If the e-mail was sent to you
>> in error
>> but does not contain patient information, please contact the sender
>> and properly
>> dispose of the e-mail.
>>
>>
>>
>>_______________________________________________
> Freesurfer mailing list
> Freesurfer@nmr.mgh.harvard.edu
> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer

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