setenforce: SELinux is disabled

Can Geliş asked:

I’m in a CentOS 5 machine, and try to install vsftpd. I want to configure ftp_home_dir using setsebool -P ftp_home_dir on but it says:

setsebool: SELinux is disabled.

I try to enable it using setenforce it still says:

setenforce: SELinux is disabled

then I tried:

semodule -n -B

and it says:

semodule: SELinux policy is not managed or store cannot be accessed.

my config file:

# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
#       enforcing - SELinux security policy is enforced.
#       permissive - SELinux prints warnings instead of enforcing.
#       disabled - SELinux is fully disabled.
# SELINUXTYPE= type of policy in use. Possible values are:
#       targeted - Only targeted network daemons are protected.
#       strict - Full SELinux protection.

Note: rebooted many times.

My answer:

Your VPS runs on OpenVZ, a container based “virtualization” which has no support for SELinux. If you need SELinux, you will need to switch to another hypervisor which supports SELinux in guests, such as Hyper-V, VMware, KVM, Xen, and possibly others.

View the full question and answer on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.