I had bought a vps ,installed centos7.

rpm -qa | grep selinux

No /etc/sysconfig/selinux and /etc/selinux/config file in my centos7.

vi  /etc/sysconfig/selinux

Reboot my vps and login.

SELinux status:                 disabled

Why can't set my selinux status as enabled?

  • 4
    If this a OpenVZ container VPS, then selinux will need to be disabled per this link wiki.openvz.org/Quick_installation_(legacy)#SELinux. That means you cannot enable/disable it as per your choice. If you need SElinux, then I'd suggest to go with the provider who has an option of KVM guests (generally a bit pricey) and go with that. You can check which one you have by following the command at: serverfault.com/questions/595471/… – sla3k Nov 7 '18 at 0:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.