quick-docs/modules/ROOT/pages/_partials/proc_cha2delete-ng-to-permissive-mode.adoc

44 lines
1.5 KiB
Text
Raw Normal View History

2018-06-22 16:10:52 +00:00
// Module included in the following assemblies:
//
// assembly_changing-selinux-states-and-modes.adoc
[#{context}-changing-to-permissive-mode]
= Changing to permissive mode
Use the following procedure to permanently change SELinux mode to permissive. When SELinux is running in permissive mode, SELinux policy is not enforced. The system remains operational and SELinux does not deny any operations but only logs AVC messages, which can be then used for troubleshooting, debugging, and SELinux policy improvements. Each AVC is logged only once in this case.
.Prerequisites
* The `selinux-policy-targeted`, `libselinux-utils`, and `policycoreutils` packages are installed on your system.
* The `selinux=0` or `enforcing=0` kernel parameters are not used.
2018-06-22 16:10:52 +00:00
2020-11-09 15:56:49 +00:00
.Procedure
. Open the `/etc/selinux/config` file in a text editor of your choice, for example:
2018-06-22 16:10:52 +00:00
----
# vi /etc/selinux/config
----
. Configure the `SELINUX=permissive` option:
[subs="quotes"]
2018-06-22 16:10:52 +00:00
----
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - No SELinux policy is loaded.
SELINUX=*permissive*
2018-06-22 16:10:52 +00:00
# SELINUXTYPE= can take one of these two values:
# targeted - Targeted processes are protected,
# mls - Multi Level Security protection.
SELINUXTYPE=targeted
----
2020-11-09 15:56:49 +00:00
. Restart the system:
2018-06-22 16:10:52 +00:00
+
2020-11-09 15:56:49 +00:00
[subs="quotes"]
2018-06-22 16:10:52 +00:00
----
# *reboot*
2018-06-22 16:10:52 +00:00
----