参考 http://hi.baidu.com/jenrald/item/b8921b82b5ade72a100ef3c0
一 前言
用ftp命令连接 ftp服务器时提示:
“500 OOPS: cannot change directory:/home/xxx”
二解决方案
百度,经证实有效解决方案是 #setseboolftp_home_diron
现将参考网页内容摘抄如下:
#setseboolftpd_disable_trans1
#servicevsftpdrestart
结果刚执行完第一条就提示“Couldnotchangeactivebooleans:Invalidboolean”,又是没见过的提示,baidu~,果然与那个“ftp_home_dir”有关,执行:
#setseboolftp_home_diron(注:在服务running状态下执行时间会比较久)
then~
#ftp192.168.2.2
Connectedto192.168.2.2(192.168.2.2).
220(vsFTPd2.2.2)
Name(192.168.2.2:root):azune
331Pleasespecifythepassword.
Password:
230Loginsuccessful.
RemotesystemtypeisUNIX.
Usingbinarymodetotransferfiles.
ftp>ls
227EnteringPassiveMode(192,168,2,2,54,76).
150Herecomesthedirectorylisting.
drwxr-xr-x25005004096Sep1810:27Desktop
drwxr-xr-x25005004096Sep1810:27Documents
drwxr-xr-x25005004096Sep1810:27Downloads
drwxr-xr-x25005004096Sep1810:27Music
drwxr-xr-x25005004096Sep1810:27Pictures
drwxr-xr-x25005004096Sep1810:27Public
drwxr-xr-x25005004096Sep1810:27Templates
drwxr-xr-x25005004096Sep1810:27Videos
226DirectorysendOK.
ftp>exit
221Goodbye.
至于ftp登录时提示“-bash:ftp:commandnotfound”的话,是缺少ftp客户端的包,安装上就好了。