Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question
Are you certain that the rest of your system can operate with SELinux enabled? – Ignacio Vazquez-Abrams May 19 '13 at 22:25
Also, what is the output of uname -a? – Ignacio Vazquez-Abrams May 19 '13 at 22:26
@IgnacioVazquez-Abrams Yes it can. uname -a: Linux vps-610.*****.com 2.6.18-028stab069.6 #1 SMP Wed May 26 18:10:06 MSD 2010 x86_64 x86_64 x86_64 GNU/Linux – Can Geliş May 19 '13 at 22:33
up vote 4 down vote accepted

The kernel you are using was built without SELinux support. Using a stock kernel will not include the appropriate parts for your VPS. Rebuilding the kernel with SELinux support will cause the VPS parts to not work. You cannot use SELinux on your VPS.

share|improve this answer
Thanks for your answer! anyway to configure ftp_home_dir of vsftpd without setsebool ? – Can Geliş May 19 '13 at 22:47
@CanGeliş: If SELinux is disabled, there's no need to play with its booleans in order to allow programs to act. You can ignore that bit. – Ignacio Vazquez-Abrams May 19 '13 at 23:03
I did it with different way. Thanks for your help! – Can Geliş May 19 '13 at 23:04

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.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.