SELinux(Security-Enhanced Linux)安全增强式Linux,是一种强制访问控制(mandatory access control)的实现。这这种控制下,linux有很多的操作是会被禁止或者是不成功的。之前在CentOS下安装vsftpd怎样都弄不上去。后来把selinux干掉之后就完事了。好了,废话少说,下面说一下彻底干掉selinux的方法。
vim/etc/selinux/config
打开selinux的配置文件,我们可以看selinux是默认开启的:
SELINUX=enforcing
所以我们要修改的就是这个了,把原来的注释掉,自己写上
SELINUX=disabled
具体如下:
# This file controls thestate of SELinux on the system.
# SELINUX= can take oneof these three values:
# enforcing - SELinux security policy isenforced.
# permissive - SELinux prints warningsinstead of enforcing.
# disabled - SELinux is fullydisabled.
#SELINUX=enforcing
SELINUX=disabled
# SELINUXTYPE= type ofpolicy in use. Possible values are:
# targeted - Only targeted network daemonsare protected.
# strict - Full SELinux protection.
SELINUXTYPE=targeted
保存退出,然后重启一下就ok了。
本文详细介绍了如何通过编辑配置文件禁用SELinux,并提供了具体的步骤和解释,以解决在CentOS环境下安装vsftpd遇到的问题。
5054





