Change the location in which SAS® Studio Basic stores session files


When you log on and use SAS Studio, session files and directories are created in C:\SAS\studioconfig\appserver\studio\temp by default. Some administrators choose to specify a different location for these files, which can be by completing the following steps.

Note: These changes are lost whenever a post-install configuration script for SAS Studio Basic runs. If an update is planned, make a copy of the working/modified files.

  1. Make a backup of the C:\sas\studioconfig\appserver\studio\conf\wrapper.conf file.

  2. Edit the C:\sas\studioconfig\appserver\studio\conf\wrapper.conf file and look for a line similar to this:
    wrapper.java.additional.4="-Djava.io.tmpdir=%CATALINA_BASE%\temp
  3. Change this to a path of your choosing:
    wrapper.java.additional.4="-Djava.io.tmpdir=C:\SASStudioTemp
    Note: The new directory, C:\SASStudioTemp, in this case needs to be manually created.
  4. Make a backup of the C:\studioconfig\appserver\studio\conf\server.xml file.
  5. Edit the studioconfig\appserver\studio\conf\server.xml file and look for a block similar to the following:

            <Host appBase="webapps"
                  autoDeploy="true"
                  deployOnStartup="true"
                  deployXML="true"
                  name="localhost"
                  unpackWARs="true">
                <Valve className="org.apache.catalina.valves.AccessLogValve"
                       directory="logs"
                       pattern="%h %l %u %t &quot;%r&quot; %s %b"
                       prefix="localhost_access_log."
                       suffix=".txt"/>
            </Host>

Add a "workDir" attribute to the <Host/> tag similar to the following:

            <Host appBase="webapps"
                  autoDeploy="true"
                  deployOnStartup="true"
                  deployXML="true"
                  name="localhost"
                  unpackWARs="true"
                  workDir="C:\SASStudioTemp">
                <Valve className="org.apache.catalina.valves.AccessLogValve"
                       directory="logs"
                       pattern="%h %l %u %t &quot;%r&quot; %s %b"
                       prefix="localhost_access_log."
                       suffix=".txt"/>
            </Host>

6. Restart SASStudioWebAppServer.
7. Test creating temporary data and uploading Files to verify that the data is created in the new location specified above.