Trying to set up mail I found out I have important file missing or it seems I do.

First of all I have no selinux in /etc/sysconfig and in /etc/selinux there is folder mls and files restorecond.conf restorecond_user.conf semanage.conf but no general conf file.

On command sestatus it says disabled.

On command yum provides /etc/selinux/config

Loaded plugins: fastestmirror, refresh-packagekit
Loading mirror speeds from cached hostfile
* epel: mirror.optus.net
selinux-policy-3.7.19-231.el6_5.1.noarch : SELinux policy configuration
Repo        : updates
Matched from:
Filename    : /etc/selinux/config

selinux-policy-3.7.19-231.el6.noarch : SELinux policy configuration
Repo        : base
Matched from:
Filename    : /etc/selinux/config

selinux-policy-3.7.19-231.el6_5.3.noarch : SELinux policy configuration
Repo        : updates
Matched from:
Filename    : /etc/selinux/config

On reboot it remains disabled after command echo 1 > /selinux/enforce before reboot.

I am on centos 6.5 and don't know how to check if SElinux is corrupted or not.

I don't think it exists in full:

-bash-4.1#  rpm -qa | grep selinux
-bash-4.1# rpm -q policycoreutils
-bash-4.1# rpm -qa | grep setroubleshoot
-bash-4.1# semanage login -l 
-bash: semanage: command not found

  • Please add the output of grep -i selinux /boot/config-$(uname -r) to your question. Is this a physical machine, a virtual machine, some type of hosting? – dawud Jun 9 '14 at 6:19
  • it is a vps have running. – cea Jun 9 '14 at 6:23
  • I don't know if your provider supports SElinux out of the box. Either way, you don't seem to have a policy installed. Install one and relabel the filesystem to check that out. – dawud Jun 9 '14 at 6:26
  • I'm not sure what to install as I thought it came with centos by default. I might have to start from scratch but thanks. – cea Jun 9 '14 at 6:56
  • 1
    You need to install a SELinux policy (yum install selinux-policy-targeted, then you'll need to relabel the whole filesystem, as this is a system that had SELinux disabled before. You need to be at least a little bit familiar with SELinux (i.e. do you want SELinux because the online guide says so?). – dawud Jun 9 '14 at 7:17

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.