續前面的:
C:\Program Files\SecureCRT>vsftp -v -p 21 [email protected]
--因為我們的vsftp的port是 21.
VSFTP 版本 5.2.2 (build 92) 啟動。 (使用 SSH2Core 版本 4.1.0.267。)
[本地]: SSH2Core version 4.1.0.267
[本地]: Connecting to 192.168.203.132:21 ...
[本地]: Changing state from STATE_NOT_CONNECTED to STATE_EXPECT_KEX_INIT.
[本地]: Using protocol SSH2
[本地]: PRE-IDENT: 220 (vsFTPd 1.1.3)
[本地]: Using protocol SSH2
[本地]: PRE-IDENT: 530 Please login with USER and PASS.
[本地]: Changing state from STATE_EXPECT_KEX_INIT to STATE_TRANSPORT_STOPPING.
[本地]: Changing state from STATE_TRANSPORT_STOPPING to STATE_CLOSING.
[本地]: Changing state from STATE_CLOSING to STATE_CLOSED.
[本地]: Connected for 44 seconds, 38 bytes sent, 116 bytes received
C:\Program Files\SecureCRT>ftp 192.168.203.132
Connected to 192.168.203.132.
220 (vsFTPd 1.1.3)
User (192.168.203.132:(none)): xiong
331 Please specify the password.
Password:
230-Welcome to Xiong's Server! Have fun!
230 Login successful. Have fun.
ftp> pwd
257 "/home/xiong"
在重新開機vsftpd服務時,發生了一個"vsftpd dead but subsys locked "錯誤.
解決方法如下:
1. vsftpd dead but subsys locked
在開啟vsftpd 時,出現"vsftpd dead but subsys locked"的提示,
解決方法:service xinetd stop
service vsftpd start
service xinetd start
如果還不行,則可能是:超級程序中有個gssftp和vsftpd沖突;屏蔽gssftp後再重起xinet和vsftpd就ok。
步驟如下:
用netstat -tlunp|grep 21檢視是否用其它FTP
再grep -i ftp /etc/xinetd.d/*
/etc/xinetd.d/gssftp:# description: The kerberized FTP server accepts FTP connections
/etc/xinetd.d/gssftp:service ftp
/etc/xinetd.d/gssftp: server = /usr/kerberos/sbin/ftpd
/etc/xinetd.d/rsync:# description: The rsync server is a good addition to an ftp server, as it
修改/etc/xinetd.d/gssftp這個檔案,
disable = no改成disable = yes
然後,重新開機xinetd,service xinetd restart
再重新開機動vsftpd, service vsftpd restart
2.連接配接FTP server時,出現 "421 Service not available."
此時檢視# cat /etc/hosts.allow
#
# hosts.allow This file describes the names of the hosts which are
# allowed to use the local INET services, as decided
# by the '/usr/sbin/tcpd' server.
#
解決方法:
在/etc/hosts.allow最後加入一句"vsftpd:ALL":
vi /etc/hosts.allow
...
...
vsftpd:ALL
附常見的解決方法(我試過,不行.
):
In RHEL AS3Update3, after started the vsftp ftp server and connected to it from another computer,
it prompted the user neaded an authorization and stopped there. Then when you use the server configure tools to restart the vsftp service ,
it says "vsftpd dead but subsys locked". I used the followed method to figure it out.
Method 1). Open the /etc/xinit.d/gssftp file. change the line "Server_args= -l -a " to "Server_args=-l "
this will resolve the authorization problem and can connect the ftp server successfully. but the password verify process is time consumer.
Method 2). Open the /etc/xinit.d/gssftp file, change the line "disable=no" to "disable=yes"
this will make the vsftp server working as a stand alone demon and the connection is fluent.
After this operation, you must use service vsftpd restart to restart the vsftp server.
順帶說一下,有google的時候,有人認為可能是配置檔案是有不明字元.
是以就需要找出除 Comment之外的有用的設定.
# more /etc/vsftpd/vsftpd.conf |grep [b]^[^#] [/b]
anonymous_enable=YES
local_enable=YES
write_enable=YES
local_umask=022
dirmessage_enable=YES
xferlog_enable=YES
connect_from_port_20=YES
xferlog_std_format=YES
pam_service_name=vsftpd
userlist_enable=YES
listen=YES
tcp_wrappers=YES