How to configure the Flexnet License Server on Linux to use a different temporary directory
By default on Linux, the Flexnet License Server for ENVI/IDL will require wide open permissions on the /tmp directory to create and manage temporary files.
In other words, both of the following default conditions must be met:
- The /tmp directory must have 777 permissions
- The /tmp directory cannot be mounted with the “noexec” flag. You can verify this mount setting in the /etc/fstab file.
If permissions are not adequate, the service may not start properly, returning a “permission denied” error when attempting to start:
$ service flexnetls-idl_lmgrd start
bash: /usr/local/harris/flexnetls_2017.08.0/jre/bin/java: Permission denied
You may also note that the flexnetls.log file, located in /var/opt/flexnetls/idl_lmgrd/logs, may contain the following error message:
ERROR Native code loading error
java.lang.UnsatisfiedLinkError: /tmp/llsnc-2017.08-amd64-libconnector.so: /tmp/llsnc-2017.08-amd64-libconnector.so: failed to map segment from shared object: Operation not permitted
SOLUTION #1: ALTER PERMISSIONS OF /tmp
Consider altering the permissions to meet both conditions mentioned earlier, if possible. IMPORTANT: Be sure to consult your local system administrator before making any changes to permissions!
1) As root, change permissions on /tmp to be 777:
2) Remove the “noexec” mount flag for /tmp in the /etc/fstab file. Here is an example of what the relevant lines in that file may look like:
$ cat /etc/fstab
/dev/mapper/vg_001-lv_tmp /tmp ext4 nodev,nosuid,noexec 1 2
/tmp /var/tmp none bind 0 0
With root privileges, in a plain text editor update the /etc/stab file to remove the “noexec” setting.
Save and close the modified file.
Then remount the /tmp directory to have the changes take effect.
SOLUTION #2: CONFIGURE THE SERVICE TO STORE TEMPORARY FILES ELSEWHERE
If changing the /tmp directory permissions is not an option in your environment, you can configure the Flexnet License Server to instead write the temporary file llsnc-2017.08-amd64-libconnector.so to an alternative location, for example to /var/tmp or another acceptable directory, by doing the following:
1) Stop the flexnetls-idl_lmgrd service
$ sudo service flexnetls-idl_lmgrd stop
2) Delete the following file (if it exists):
3) Edit the file /etc/default/ flexnetls-idl_lmgrd with a plain text editor using root privileges, uncommenting the last line and adding this setting to point to an alternative temporary directory:
Close and save the modified file.
4) Restart the flexnetls-idl_lmgrd service
$ sudo service flexnetls-idl_lmgrd start
With these changes made, the service should start up and function normally.
Created by BCNA 4/15/2021, Reviewed by JU 04/15/2021