How Can I Enable SELinux on an ECS Running CentOS?
Symptom
SELinux is disabled on ECSs running CentOS 7.5 by default. After I enable SELinux by running /etc/selinux/config and enter the login password, the login failed.
This section describes how to resolve this issue based on enabled SELinux.
Solution
The operations described in this section are performed on ECSs running CentOS 7.5.
- Run the following command to change SELINUX=disabled in the SELinux configuration file to SELINUX=enforcing:
vim /etc/selinux/config
- Run the following command to automatically enable SELINUX on the file system upon ECS restarting:
- Run the following command to restart the ECS for the configuration to take effect:
OS Faults FAQs
- Why Does the OS Fail to Respond When kdump Occurs on a Linux ECS?
- How Can I Upgrade the Kernel of a Linux ECS?
- Why Cannot My ECS OS Start Properly?
- How Can I Fix the Meltdown and Spectre Security Vulnerabilities on Intel Processor Chips?
- How Can I Enable SELinux on an ECS Running CentOS?
- Why Does a Forcibly-Stopped Linux ECS Fail to Be Restarted?
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.
more