FastX 3 Directories


Installation Directory

Default: /usr/lib/fastx/3
This can be changed during installation

Var Directory

Default: /usr/lib/fastx/var

Directory for Configuration, database, licenses, and local files.  The var directory contains files that are specific to this installation of FastX. This includes configuration files (see FastX config Directory below), the local directory (see below), web (SSL) certificates, license files, and local web files (if used).

While not recommended, the FastX web server can be configured to use a different var directory by setting the environment variable FX_VAR_DIR. See “Setting Environment Variables” below.

Config Directory

Default: /usr/lib/fastx/var/config

Change by setting FX_CONFIG_DIR environment variable

The config directory contains configuration files that can be common across all FastX cluster members.
The config directory is read by the fastx-protocol and session start scripts, as well as the FastX web server.

Local Directory

Default: /usr/lib/fastx/var/local

Change by setting FX_LOCAL_DIR environment variable

The local directory contains the FastX database, the server ID, and the public-private key for this FastX server. This directory must be unique (not shared) for each FastX server (including FastX cluster members)

Authorized Keys Directory

Default: NA

Change by setting FX_AUTHORIZED_KEYS_DIR environment variable

In a clustered environment, all servers require a public key to sign and verify messages coming from other servers.  These keys are stored in the database by default.  This poses a security threat if a server in the cluster is compromised as it could modify and fake another server’s public key.  For maximum security, the public keys can be stored outside of the database in a directory.  Set the environment variable FX_AUTHORIZED_KEYS_DIR to enable offline storage of public keys.

User Directory

Default: $HOME/.fastx_server

Change by setting FastXPath in FastX.conf file

The FastX user directory can hold the user’s bookmarks and history when the FastX web server is not running. (When the FastX web server is running, these items are stored in the FastX database.)

Session Directory

Default: $HOME/.fastx_server/hostname/FX3-sessionID

Change by setting the SessionPath variable in the FastX.conf file.

The FastX session directory holds a sub-directory for every FastX running session. Each session sub-directory contains session log files, the X11 authority file, session parameters, and miscellaneous settings including process IDs, display numbers, etc.

The path to the session sub-directory is set in the FASTX_SESSION_DIR environment variable in the running session.

Setting Environment Variables

Service Files

Directory: /etc/sysconfig/fastx3

In the default FastX installation, service startup files to start the FastX web server (and the license manager) are automatically installed when the “install.sh” script is run. The FX_* environment variables are modified in the file /etc/sysconfig/fastx3. Variables are set using the syntax “NAME=value”.

Hostname Substitution

Directory: /etc/sysconfig/fastx3

In some cases, such as when several FastX servers (including cluster members) mount the same FastX var directory, it is necessary to specify a unique directory name by including the system host name. This can be done in the /etc/sysconfig/fastx3 file with a substitution that depends on the type of system.

If the system uses systemd, which is default for modern Linux systems including Red Hat 7 or later, use “%H” to substitute the host name. For earlier systems, using the older init.d startup file,  use “$HOST”. To determine if your system is using systemd, run the command systemctl. If it shows many units loaded, then your system is a systemd system. If the systemctl command is not found, or shows nothing, then your system is the older init.d type.

Example

Suppose FastX is installed, as above, in /opt/sw/fx, and you wish to configure your local directory as /opt/sw/fx/var/local/`hostname`/. Further, suppose your system is a RedHat 7 system running systemd. Therefore, assuming the startup files have all been created, the file /etc/sysconfig/fastx3 would be created with this line:

FX_LOCAL_DIR=/opt/sw/fx/var/local/%H

Non-root Installation

If the FastX web server is not being started from a system startup file, then the “run-web” script is probably being used. In this case the environment variables will be set manually. For example, suppose FastX is installed in your home directory at $HOME/FastX and you wish to set the local directory to $HOME/.fastx-server/var/local. In this case, you would start FastX with the following command:

FX_LOCAL_DIR=$HOME/.fastx_server/var/local $HOME/FastX/lib/fastx/3/tools/run-web

Per-User Directories

In some cases you may wish to put the users’ session directories in a location not in their home directory. For example, suppose the session directory should be in /var/fastx/user/$USER/$HOST/sessions. To do this, the FastX.conf file (in the config directory) will have this line:

SessionPath=/var/fastx/user/$USER/$HOST/sessions