

Since this change will not survive a reboot, you will need to edit the /etc/selinux/config file and set the SELINUX variable to either enforcing, permissive, or disabled in order to achieve persistence across reboots: How to Enable and Disable SELinux Mode If you want to toggle the operation mode, use setenforce 0 (to set it to Permissive) or setenforce 1 ( Enforcing).

To display the current mode of SELinux, use getenforce. However, learning how to use this tool is better than just ignoring it. Although it is not an operation mode itself, it is still an option. Permissive: SELinux does not deny access, but denials are logged for actions that would have been denied if running in enforcing mode.

Enforcing: SELinux denies access based on SELinux policy rules, a set of guidelines that control the security engine.Security Enhanced Linux can operate in two different ways: Introduction to SELinux and How to Use it on CentOS 7 In this article we will explain the essentials of SELinux and AppArmor and how to use one of these tools for your benefit depending on your chosen distribution. In CentOS 7, SELinux is incorporated into the kernel itself and is enabled in Enforcing mode by default (more on this in the next section), as opposed to openSUSE and Ubuntu which use AppArmor. SELinuxĪnother popular and widely-used MAC is AppArmor, which in addition to the features provided by SELinux, includes a learning mode that allows the system to “ learn” how a specific application behaves, and to set limits by configuring profiles for safe application usage. To overcome the limitations of and to increase the security mechanisms provided by standard ugo/rwx permissions and access control lists, the United States National Security Agency (NSA) devised a flexible Mandatory Access Control (MAC) method known as SELinux (short for Security Enhanced Linux) in order to restrict among other things, the ability of processes to access or perform other operations on system objects (such as files, directories, network ports, etc) to the least permission possible, while still allowing for later modifications to this model.
