Turn SELinux on and off

Source: Internet
Author: User

SELinux is the NSA's implementation of mandatory access control, the most outstanding new security subsystem in Linux history. But it is because the function is too powerful, which causes many times to work inconvenient, so some cases need to turn off SELinux.

There are two important documents /etc/sysconfig/selinux and /etc/selinux/config under SELinux.

/etc/sysconfig/selinux is a soft connection to a /etc/selinux/config file

View the SELinux status command disabled to turn off Enbledw to turn on the following two command functions the same

[email protected] ~]# /usr/sbin/sestatus-v

SELinux status:disabled

[email protected] ~]# Getenforce

Disabled

Turn off SELinux

temporarily closed # #不用重启服务

Setenforce 0 # #临时关闭防火墙

Setenforce 1 # #临时开启防火墙

Permanent Open | off # #修改完需要重启服务生效

Vim/etc/selinux/config

selinux=disabled # #关闭

Selinux=enforcing# #开启

Turn SELinux on and off

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.