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?
- What Should I Do If the Cursor Is Unavailable After a GNOME GUI Is Installed on a Kunpeng ECS Running CentOS 7 or NeoKylin NKASV 7?
- How Do I View the GPU Usage of a GPU-accelerated ECS?
- Why Does the NVIDIA Kernel Crashes on a GPU-accelerated ECS?
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbotmore