CentOS 7.6 Close Selinux

Check selinux status

[[emailprotected] ~]# sestatus

SELinux status: enabled
SELinuxfs
mount: /sys/fs/selinux
SELinux root directory:
/etc/selinux
Loaded policy name: targeted
Current mode: enforcing
Mode from config
file: enforcing
Policy MLS status: enabled
Policy deny_unknown status: allowed
Max kernel policy version:
28

< h2>Temporary closure

[[email protected] ~]# setenforce  0

Close permanently

You can modify the configuration file /etc/selinux/config, set SELINUX to disabled. If you are not logging in with the root account, remember to add sudo in front.

[[email protected] ~]# vi /etc/selinux/< span style="color: #000000;">config


# 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
=enforcing
SELINUX
=disabled
# SELINUXTYPE
= can take one of three two values:
# targeted
- Targeted processes are protected,
# minimum
- Modification of targeted policy. Only selected processes are protected.
# mls
- Multi Level Security protection.
SELINUXTYPE
=targeted

[[email protected]
~]# sestatus
SELinux status: disabled

Check selinux status

[[emailprotected] ~]# sestatus

SELinux status: enabled
SELinuxfs
mount: /sys/fs/selinux
SELinux root directory:
/etc/selinux
Loaded policy name: targeted
Current mode: enforcing
Mode from config
file: enforcing
Policy MLS status: enabled
Policy deny_unknown status: allowed
Max kernel policy version:
28

< p>

[[email protected] ~]# sestatus

SELinux status: enabled
SELinuxfs
mount: /sys/fs/selinux
SELinux root directory:
/etc/selinux
Loaded policy name: targeted
Current mode: enforcing
Mode from config
file: enforcing
Policy MLS status: enabled
Policy deny_unknown status: allowed
Max kernel policy version:
28

[[email Protected] ~]# sestatus

SELinux status: enabled
SELinuxfs
mount: /sys/fs/selinux
SELinux root directory:
/etc/selinux
Loaded policy name: targeted
Current mode: enforcing
Mode from config
file: enforcing
Policy MLS status: enabled
Policy deny_unknown status: allowed
Max kernel policy version:
28

[[email Protected] ~]# setenforce 0

[ [emailprotected] ~]# setenforce 0

[[emailprotected ] ~]# vi /etc/selinux/config


# 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
=enforcing
SELINUX
=disabled
# SELINUXTYPE
= can take one of three two values:
# targeted
- Targeted processes are protected,
# minimum
- Modification of targeted policy. Only selected processes are protected.
# mls
- Multi Level Security protection.
SELINUXTYPE
=targeted

[[email protected]
~]# sestatus
SELinux status: disabled

WordPress database error: [Table 'yf99682.wp_s6mz6tyggq_comments' doesn't exist]
SELECT SQL_CALC_FOUND_ROWS wp_s6mz6tyggq_comments.comment_ID FROM wp_s6mz6tyggq_comments WHERE ( comment_approved = '1' ) AND comment_post_ID = 4841 ORDER BY wp_s6mz6tyggq_comments.comment_date_gmt ASC, wp_s6mz6tyggq_comments.comment_ID ASC

Leave a Comment

Your email address will not be published.