Since the ExcludeDirectory value is coming from policy to be used to apply configuration locally on a machine, the agent overwrites any previous values in config.ini if it is present in the policy which overwrites custom exclusions
There is no way to stop the agent from doing this at this time for Agents get most of their configurations through policy.
If you do not want any value for exclude directory set in policy, you will need to remove the policy property from the BeaconTargetPropertyValue_MT table as the Inventory Settings page on the FNMS UI seems to set an empty value if the include directory or exclude directory was previously set.
Note, as such, this is not an issue with the FNMS agent but the inventory settings UI.
This workaround is for On-premise customer's only, for it'll require updating the FNMS database
Note that the cached device configuration contents.ndc on an agent device will cause the 'original' value to be restored to config.ini on the next policy run after exclude directory is removed from the FNMS db policy properties. If this is not desired, the 'cache' and 'pkgcache' directories on the agent machine in /var/opt/managesoft/launcher should be deleted and then policy reapplied.
Also note that if the Inventory Settings page in the FNMS UI is saved again, the exclude directory property will be added to BeaconTargetPropertyValue_MT again, requiring the above workaround to be applied to remove it.
On going enhancement to locally preserve ExcludeDirectory configurations for Unix-like devices:
Enhancement# IOJ-2119539
Jun 30, 2020 11:27 PM