今天在配置ftp时,所有配置完毕后,,启动vsftpd,通过用户登陆ftp,居然报错:
C:\>ftp 10.10.1.239
Connected to 10.10.1.239
220 (vsFTPd 2.0.5)
User (10.10.1.239:(none)): xaftp
331 Please specify the password.
Password:
500 OOPS: cannot change directory:/home/xaftp
Login failed.
ftp> ls
500 OOPS: child died
Connection closed by remote host.
觉得这个 问题很奇怪,配置肯定没问题,总是提示500 OOPS: cannot change directory:/home/xaftp
解决方法:
在终端输入命令:
setsebool ftpd_disable_trans 1
service vsftpd restart
就OK了!
其 实这是SELinux的设置命令.
其实 man 一下setsebool也知道了:
NAME
setsebool - set SELinux boolean value
在不熟悉SELnux前,把SELinux关掉也可以的。有时间研究 下SELinux。
在想用SELinux但是又不熟悉的情况下可以把SELinux设置成Permissive,表示SELinux规则启 动,但只是把违规的记录到log中。
本文出自 “技术成就梦想” 博客,请务必保留此出处 http://ixdba.blog.51cto.com/2895551/526103
时间: 2024-08-03 19:32:47