Kaspersky Embedded Systems Security for Linux

Configuring permissions in the SELinux system

If SELinux could not be configured automatically during the post-installation configuration of the application, or if you declined automatic configuration, you can manually configure SELinux to work with Kaspersky Embedded Systems Security.

To manually configure SELinux to work with the application:

  1. Switch SELinux to permissive mode:
    • If SELinux has been activated, run the following command:

      # setenforce Permissive

    • If SELinux was disabled, set the SELINUX=permissive setting in the configuration file / etc / selinux / config and restart the operating system.
  2. Make sure the semanage utility is installed on the system. If the utility is not installed, install the policycoreutils-python or policycoreutils-python-utils package, depending on the package manager.
  3. If you are using a custom SELinux policy instead of the default targeted policy, assign a label to each source executable file of Kaspersky Embedded Systems Security in accordance with the SELinux policy being used; to do so, run the following commands:

    # semanage fcontext -a -t bin_t <executable file>

    # restorecon -v <executable file>

    where <executable file> is:

    • /var/opt/kaspersky/kess/3.4.0.<build number>_<installation timestamp>/opt/kaspersky/kess/libexec/kess
    • /var/opt/kaspersky/kess/3.4.0.<build number>_<installation timestamp>/opt/kaspersky/kess/bin/kess-control
    • /var/opt/kaspersky/kess/3.4.0.<build number>_<installation timestamp>/opt/kaspersky/kess/libexec/kess-gui
    • /var/opt/kaspersky/kess/3.4.0.<build number>_<installation timestamp>/opt/kaspersky/kess/shared/kess
  4. Run the following tasks:
    • File Threat Protection task:

      kess-control --start-task 1

    • Critical Areas Scan task:

      kess-control --start-task 4 -W

    It is recommended to run all the tasks that you plan to run while using Kaspersky Embedded Systems Security.

  5. Start the graphical user interface if you plan to use it.
  6. Ensure that there are no errors in the audit.log file:

    # grep kess /var/log/audit/audit.log

  7. If there are errors in the audit.log file, create and download a new rule module based on the blocking records in order to fix the errors, and then relaunch all the tasks that you plan to run while using Kaspersky Embedded Systems Security; to do so, run the following commands:

    # grep kess /var/log/audit/audit.log | audit2allow -M kess

    # semodule -i kess.pp

    If new audit messages related to Kaspersky Embedded Systems Security appear, the file with the rule module file must be updated.

  8. Switch SELinux to blocking mode:

    # setenforce Enforcing

If you use a custom SELinux policy, manually assign a label to Kaspersky Embedded Systems Security source executable files after installing application updates (follow steps 1, 3–8).

For additional information, please refer to the documentation on the relevant operating system.