Enabling sensor auto-start on a Linux system
The following procedure has been tested with Red Hat® Enterprise Linux®; there might be some variation for other Linux varieties. Review these steps with your system administrator before you make any changes.
To enable Fortify ScanCentral SAST sensor auto-start on a Linux system:
- Log in to the machine as “root.”
-
Run the
visudocommand to edit thesudoersfile and disable requiretty.Defaults !requiretty
You can also disable requiretty per user.
-
Set auto-start as follows:
-
Verify the command invocation from the console (modify it based on your install directory).
sudo -u <username> -- <sast_install_dir>/bin/ScanCentral -url <controller_url> worker > <sast_install_dir>/bin/workerout.txt 2>&1 &
- Add the
sudocommand to the end of the file (add it before the lineexit 0if it exists). - The ampersand (
&) at the end enables the machine to start up even if sensor startup fails or hangs. - The double-dash (
--) is important to separate the options for sudo from the options for your service.
- Add the
-
Make the change to the startup file.
Make sure that you do not change anything else in your bootup script.
vi /etc/rc.d/rc.local
-
-
Check the setup:
- Reboot and log in to the machine as “root.”
-
To verify the processes under root, type:
ps -x | grep java
- Verify that the output shows that the sensor is not started under root.
-
To verify the processes under the user, type:
sudo -u <username> ps x | grep java
- Verify that the output displays the sensor process.
-
To verify the existence and contents of the script output file, type:
tail -f /opt/<sast_install_dir>/bin/workerout.txt
For example:
tail -f /opt/Fortify/OpenText_SAST_Fortify_25.2.0/bin/workerout.txt