Foglight does not start after changing service to Named Service account
After changing the service owner from Local System to a Named Service Account, Foglight Management Server does not start.
The following error appears in the log files:
Unexpected error during server startup, exiting with error code 1133.
org.apache.catalina.LifecycleException: cannot remove old state directory
Caused by: java.io.IOException: Could not delete C:\ProgramFiles\Foglight\state\tomcat\webapps\config, reason unknown
The account lacks the privileges to access the files within "...Foglight\state\tomcat\webapps\config"
The Named Service Account must have local Administrator privileges.
Foglight fails startup since the named account does not have permissions to delete existing files.
The same behavior can be seen on a *nix FMS host, if the FMS process is run as 'root', then switched to a different service account. The service account may lack the permissions to access these same files. Changing the file ownership to the service account restores functionality.