centos6.4 查看和关闭selinux
时间:2015-03-09 01:30 来源:linux.it.net.cn 作者:IT
-
安装vsftpd服务后,客户端登录ftp报错:
ftp> open 127.0.0.1
Connected to 127.0.0.1 (127.0.0.1).
220 (vsFTPd 2.2.2)
Name (127.0.0.1:wander): ftpuser
331 Please specify the password.
Password:
500 OOPS: cannot change directory:/home/ftpuser
Login failed.
原因是系统没有关闭selinux
[wander@localhost ~]$
/usr/sbin/sestatus
-
v
SELinux status: disabled
//
禁用selinux
[wander@localhost ~]$ getenforce
Disabled
//
禁用selinux
[wander@localhost .
ssh
]$ getenforce
Enforcing
//
启动
#setenforce 0 #设置SELinux 成为permissive模式
#setenforce 1 设置SELinux 成为enforcing模式
#vim /etc/selinux/config 编辑文件
# 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 - No SELinux policy is loaded.
SELINUX=enforcing
# SELINUXTYPE= can take one of these two values:
# targeted - Targeted processes are protected,
# mls - Multi Level Security protection.
(责任编辑:IT)
原因是系统没有关闭selinux
(责任编辑:IT) |