Fortify 23.1 - Unable to repair installation.properties file

When running the FPRUtility I get an error message about being unable to repair the installation.properties file. It seems odd that it would be looking in /usr/bin when my install path is set to /opt/Fortify...

com.fortify.exceptions.FortifyException: Unable to repair installation.properties file. Please run scapostinstall at least once with a user that has permissions to write to the install directory (/usr/bin/../Core/config/installation.properties).
at com.fortify.util.InstallationConfiguration.checkGUID(InstallationConfiguration.java:202)
at com.fortify.util.InstallationConfiguration.loadInstallationProperties(InstallationConfiguration.java:219)
at com.fortify.util.InstallationConfiguration.getProductType(InstallationConfiguration.java:247)
at com.fortify.util.InstallationConfiguration.getProductWorkingDirectory(InstallationConfiguration.java:146)
at com.fortify.awb.AwbLaunch.run(AwbLaunch.java:84)
at com.fortify.awb.AwbLaunch.main(AwbLaunch.java:37)
Caused by: java.io.IOException: No such file or directory
at java.base/java.io.UnixFileSystem.createFileExclusively(Native Method)
at java.base/java.io.File.createNewFile(File.java:1035)
at com.fortify.util.InstallationConfiguration.checkGUID(InstallationConfiguration.java:195)
... 5 more

Installer commands:

./Fortify_SCA_*.run --mode unattended --installdir "$INSTALL_DIR" --fortify_license_path $(pwd)/fortify.license

./Fortify_Apps_and_Tools_*.run --mode unattended --installdir /opt/Fortify/Fortify_Tools_and_Apps_"$FORTIFY_VERSION" --fortify_license_path $(pwd)/fortify.license

I tried creating an empty file at /usr/bin/opt/Fortify/Fortify_SCA_23.1.0/Core/config/installation.properties and /opt/Fortify/Fortify_Tools_and_Apps_23.1.0/Core/config/installation.properties, but that doesn't seem to fix anything.

I wouldn't expect to need to run scapostinstall after doing an unattended install from scratch without attempting migration or anything like that.

Any ideas would be appreciated, thanks.

  • 0

    Clarification, I think this error was actually produced by running "ReportGenerator" not "FPRUtility". Creating an empty properties file at /usr/bin/../Core/config/installation.properties seems to have fixed the error. Although it still seems odd it would be expecting a directory structure there at the base /usr dir.

  • 0   in reply to 

    I also get a similar error right after installing the SCA tools on Linux (Fedora):

    $ /opt/fortify/tools/23.1.0/bin/ReportGenerator -h
    Exception in thread "main" com.fortify.exceptions.FortifyException: Unable to repair installation.properties file. Please run scapostinstall at least once with a user that has permissions to write to the install directory (/opt/fortify/tools/23.1.0/Core/config/installation.properties).
         at com.fortify.util.InstallationConfiguration.checkGUID(InstallationConfiguration.java:202)
         at com.fortify.util.InstallationConfiguration.loadInstallationProperties(InstallationConfiguration.java:219)
         at com.fortify.util.InstallationConfiguration.getProductType(InstallationConfiguration.java:247)
         at com.fortify.util.InstallationConfiguration.getProductLogDirectory(InstallationConfiguration.java:112)
         at com.fortify.logging.log4j2.logger.Log4j2Initializer.initLogger(Log4j2Initializer.java:62)
         at com.fortify.ui.model.report.ReportCommandlineInterface.main(ReportCommandlineInterface.java:89)
    Caused by: java.io.IOException: Permission denied
         at java.base/java.io.UnixFileSystem.createFileExclusively(Native Method)
         at java.base/java.io.File.createNewFile(File.java:1035)
         at com.fortify.util.InstallationConfiguration.checkGUID(InstallationConfiguration.java:195)
         ... 5 more

    I had to run the above command as sudo only once so it could write the installation.properties file. Then it worked fine after that. (You can use fortifyclient or BIRTReportGenerator for the same effect.)

    This is clearly a bug. Thank you for bringing this to my attention. I will file a bug report for it.

  • 0   in reply to   

    I should mention for reference that I installed the SCA tools as sudo:

    sudo ./Fortify_Apps_and_Tools_23.1.0_linux_x64.run --mode unattended --installdir /opt/fortify/tools/23.1.0

  • 0 in reply to   

    This seems to be also the case for 24.0 when you create a docker file so its a thing.