# XNAT File System Settings

In order for XNAT to work properly, it needs to know where to look for the files it needs. This is where you can configure the paths where XNAT should look, as well as configure some other file system related options. These options are configured on your initial setup. Each of these file system paths and their utility is discussed  in further detail in the documentation for Understanding the Components of XNAT

## File Path Settings

It can be dangerous to change file path settings in a running XNAT.

SettingProperty NameDescriptionDefault
Archive PatharchivePathThis should be the location of the XNAT archive. This is where all the image files for sessions that have been added to XNAT are stored. Modifying this on systems that have already been set up can cause problems, so editing of this is disabled. This path can either be relative, or absolute, and should use the appropriate slashes for your file system./data/xnat/archive
Cache PathcachePathThis should be the location where you want XNAT to cache image session data. This path can either be relative, or absolute, and should use the appropriate slashes for your file system./data/xnat/cache
Prearchive PathprearchivePathThis should be the location of the XNAT prearchive. This is where new imagine sessions are stored while awaiting review before they are archived. This path can either be relative, or absolute, and should use the appropriate slashes for your file system./data/xnat/prearchive
FTP PathftpPathThis is the path where the XNAT FTP Server (no longer available) would write files to. This path can be set to a dummy value if you aren't setting up the FTP Server. This can either be a relative or absolute path, and should use the appropriate slashes for your file system./data/xnat/ftp
Build PathbuildPathThis property is not currently used by the XNAT webapp itself, but may be used by pipelines. This path can either be relative, or absolute, and should use the appropriate slashes for your file system./data/xnat/build
Pipeline PathpipelinePathThis should be the location of your pipeline scripts. This path can either be relative, or absolute, and should use the appropriate slashes for your file system./data/xnat/pipeline
Quarantine LocationtriagePathIf set, this file path will contain any "triaged" resource files that are uploaded via Custom Resource Uploaders.

## File Archive Behavior Settings

SettingProperty NameDescriptionDefault
ZIP ExtensionszipExtensions

This should be a comma-separated-list of all the file extensions that XNAT should treat as zips. It will use the ZipUtils class and the ZIP CompressionMethod when encountering these files. Other extensions (.tar and .gz) are handled separately.

When listing the zip extensions, you should not include periods. The default list of zip extensions is "zip,jar,rar,ear,gar,mrb".

zip,jar,rar,ear,gar,mrb
Checksumschecksums

This switch box controls whether checksums should be calculated for each image file as it's archived. Activating this provides greater assurance of data integrity, but may add significant overhead to the archive process. It is enabled by default.

True (Enabled)
Backup to-be-deleted data to cache "recycle bin"backupDeletedToCache

Determines how XNAT should dispose of resource files when a user deletes an XNAT data object (i.e. subjects, image sessions, or projects).

If enabled, XNAT moves resource files to a "DELETED" subfolder located in the cache, acting as a Recycle Bin where files can be recovered from later. If disabled, these resource files are permanently deleted when the corresponding XNAT data objects are deleted.

False (Disabled)
Track file historymaintainFileHistory

Determines how XNAT should dispose of resource files when a user deletes individual files (e.g. by using the Manage Files UI).

If enabled, XNAT retains copies of deleted files in a ".history" subdirectory of the cache space for version control. If disabled, these resource files are permanently deleted.

False (Disabled)
Show Prearchive File ActionsuiShowPrearchiveFileActionsDisplays the "File Actions" dropdown menu in the Prearchive UI, if enabled.True (Enabled)

Site-wide config properties can be accessed via REST at /xapi/siteConfig/values/{property-name}.

Site-wide config properties can be access programmatically in Velocity via \$siteConfig.{property-name}.