歡迎您光臨本站 註冊首頁

vsftp就是登陸不了,求救

←手機掃碼閱讀     火星人 @ 2014-03-04 , reply:0

vsftp就是登陸不了,求救

系統是CENTOS5.0 ,FTP伺服器是VSFTPD ,本來是想實現匿名用戶只能下載,特定用戶ftpuser可以上傳這個簡單功能,但是現在發現不管是匿名用戶還是ftpuser都無法登陸,請各位幫忙看看,謝謝! 配置文件如下:
# Example config file /etc/vsftpd/vsftpd.conf
#
# The default compiled in settings are fairly paranoid. This sample file
# loosens things up a bit, to make the ftp daemon more usable.
# Please see vsftpd.conf.5 for all compiled in defaults.
#
# READ THIS: This example file is NOT an exhaustive list of vsftpd options.
# Please read the vsftpd.conf.5 manual page to get a full idea of vsftpd's
# capabilities.
#
# Allow anonymous FTP? (Beware - allowed by default if you comment this out).
anonymous_enable=YES
no_anon_password=YES
#
# Uncomment this to allow local users to log in.
local_enable=YES
#
# Uncomment this to enable any form of FTP write command.
write_enable=YES
#
# Default umask for local users is 077. You may wish to change this to 022,
# if your users expect that (022 is used by most other ftpd's)
local_umask=022
#
# Uncomment this to allow the anonymous FTP user to upload files. This only
# has an effect if the above global write enable is activated. Also, you will
# obviously need to create a directory writable by the FTP user.
#anon_upload_enable=YES
#
# Uncomment this if you want the anonymous FTP user to be able to create
# new directories.
#anon_mkdir_write_enable=YES
#
# Activate directory messages - messages given to remote users when they
# go into a certain directory.
dirmessage_enable=YES
#
# Activate logging of uploads/downloads.
xferlog_enable=YES
#
# Make sure PORT transfer connections originate from port 20 (ftp-data).
connect_from_port_20=YES
#
# If you want, you can arrange for uploaded anonymous files to be owned by
# a different user. Note! Using "root" for uploaded files is not
# recommended!
#chown_uploads=YES
#chown_username=whoever
#
# You may override where the log file goes if you like. The default is shown
# below.
xferlog_file=/var/log/vsftpd.log
#
# If you want, you can have your log file in standard ftpd xferlog format
xferlog_std_format=YES
#
# You may change the default value for timing out an idle session.
#idle_session_timeout=600
#
# You may change the default value for timing out a data connection.
#data_connection_timeout=120
#
# It is recommended that you define on your system a unique user which the
# ftp server can use as a totally isolated and unprivileged user.
#nopriv_user=ftpsecure
#
# Enable this and the server will recognise asynchronous ABOR requests. Not
# recommended for security (the code is non-trivial). Not enabling it,
# however, may confuse older FTP clients.
#async_abor_enable=YES
#
# By default the server will pretend to allow ASCII mode but in fact ignore
# the request. Turn on the below options to have the server actually do ASCII
# mangling on files when in ASCII mode.
# Beware that on some FTP servers, ASCII support allows a denial of service
# attack (DoS) via the command "SIZE /big/file" in ASCII mode. vsftpd
# predicted this attack and has always been safe, reporting the size of the
# raw file.
# ASCII mangling is a horrible feature of the protocol.
#ascii_upload_enable=YES
#ascii_download_enable=YES
#
# You may fully customise the login banner string:
ftpd_banner=Welcome to zw FTP service.
banner_file=/etc/vsftpd/banner
#
# You may specify a file of disallowed anonymous e-mail addresses. Apparently
# useful for combatting certain DoS attacks.
#deny_email_enable=YES
# (default follows)
#banned_email_file=/etc/vsftpd/banned_emails
#
# You may specify an explicit list of local users to chroot() to their home
# directory. If chroot_local_user is YES, then this list becomes a list of
# users to NOT chroot().
chroot_list_enable=YES
chroot_local_user=YES
# (default follows)
#chroot_list_file=/etc/vsftpd/chroot_list
#
# You may activate the "-R" option to the builtin ls. This is disabled by
# default to avoid remote users being able to cause excessive I/O on large
# sites. However, some broken FTP clients such as "ncftp" and "mirror" assume
# the presence of the "-R" option, so there is a strong case for enabling it.
#ls_recurse_enable=YES
#
# When "listen" directive is enabled, vsftpd runs in standalone mode and
# listens on IPv4 sockets. This directive cannot be used in conjunction
# with the listen_ipv6 directive.
listen=YES
#
# This directive enables listening on IPv6 sockets. To listen on IPv4 and IPv6
# sockets, you must run two copies of vsftpd whith two configuration files.
# Make sure, that one of the listen options is commented !!
#listen_ipv6=YES

pam_service_name=vsftpd
userlist_enable=YES
userlist_deny=NO
tcp_wrappers=YES
use_localtime=YES
local_root=/var/ftp
anon_max_rate=512000
local_max_rate=512000
max_clients=1000
max_per_ip=10

另外/var/ftp我已經給了許可權:
# ll /var/ftp
總計 4
drwxrwxr-x 2 root ftp 4096 2008-05-25 pub
drwxrwxr-x  3 root ftp   4096 06-01 05:10 ftp

ftpuser用戶也已經添加:
ftpuser:x:500:50::/home/ftpuser:/sbin/nologin

另外vsftpd.user_list 裡面已經添加下面用戶
# vi /etc/vsftpd.user_list
ftpuser
anonymous
ftp

不管用哪個用戶登陸錯誤都如以下:
# ftp 127.0.0.1
Connected to 127.0.0.1.
220-歡迎登入!!!
220
530 Please login with USER and PASS.
530 Please login with USER and PASS.
KERBEROS_V4 rejected as an authentication type
Name (127.0.0.1:root): ftpuser
530 Permission denied.
Login failed.
ftp> bye
221 Goodbye.


實在搞不明白為什麼就登陸不了!!

[ 本帖最後由 grace_redhat 於 2009-6-5 09:51 編輯 ]
《解決方案》

看看系統日誌
《解決方案》

沒登陸 日誌是空的
《解決方案》

/var/log/messages裡面
《解決方案》

# vi /var/log/messages

May 31 23:09:55 localhost syslogd 1.4.1: restart.
May 31 23:16:34 localhost named: socket: too many open file descriptors
May 31 23:42:35 localhost last message repeated 6 times
May 31 23:42:35 localhost last message repeated 5 times
May 31 23:48:24 localhost avahi-daemon: Withdrawing address record for 192.168.2.164 on eth0.
May 31 23:48:24 localhost avahi-daemon: Leaving mDNS multicast group on interface eth0.IPv4 with address 192.168.2.164.
May 31 23:48:25 localhost avahi-daemon: iface.c: interface_mdns_mcast_join() called but no local address available.
May 31 23:48:25 localhost avahi-daemon: Interface eth0.IPv4 no longer relevant for mDNS.
May 31 23:48:25 localhost avahi-daemon: Withdrawing address record for fe80::20c:29ff:fe90:b60d on eth0.
May 31 23:48:25 localhost avahi-daemon: Leaving mDNS multicast group on interface eth0.IPv6 with address fe80::20c:29ff:fe90:b60d.
May 31 23:48:25 localhost avahi-daemon: iface.c: interface_mdns_mcast_join() called but no local address available.
May 31 23:48:25 localhost avahi-daemon: Interface eth0.IPv6 no longer relevant for mDNS.
May 31 23:48:29 localhost kernel: eth0: link up
May 31 23:48:31 localhost avahi-daemon: New relevant interface eth0.IPv6 for mDNS.
May 31 23:48:31 localhost avahi-daemon: Joining mDNS multicast group on interface eth0.IPv6 with address fe80::20c:29ff:fe90:b60d.
May 31 23:48:31 localhost avahi-daemon: Registering new address record for fe80::20c:29ff:fe90:b60d on eth0.
May 31 23:48:32 localhost avahi-daemon: New relevant interface eth0.IPv4 for mDNS.
May 31 23:48:32 localhost avahi-daemon: Joining mDNS multicast group on interface eth0.IPv4 with address 192.168.2.164.
May 31 23:48:32 localhost avahi-daemon: Registering new address record for 192.168.2.164 on eth0.
May 31 23:59:38 localhost kernel: set_rtc_mmss: can't update from 0 to 59
Jun  1 00:59:56 localhost last message repeated 8 times
Jun  1 02:59:27 localhost kernel: set_rtc_mmss: can't update from 0 to 59
Jun  1 02:59:53 localhost last message repeated 10 times
Jun  1 02:59:56 localhost kernel: set_rtc_mmss: can't update from 1 to 59
Jun  1 02:59:58 localhost kernel: set_rtc_mmss: can't update from 1 to 59
Jun  1 03:59:45 localhost kernel: set_rtc_mmss: can't update from 0 to 59
Jun  1 09:29:35 localhost last message repeated 8 times
Jun  1 10:29:43 localhost last message repeated 10 times
~
# cat /var/log/messages|grep vsftpd
#
《解決方案》

tail /var/log/messages
《解決方案》

# tail /var/log/messages
May 31 23:48:32 localhost avahi-daemon: Registering new address record for 192.168.2.164 on eth0.
May 31 23:59:38 localhost kernel: set_rtc_mmss: can't update from 0 to 59
Jun  1 00:59:56 localhost last message repeated 8 times
Jun  1 02:59:27 localhost kernel: set_rtc_mmss: can't update from 0 to 59
Jun  1 02:59:53 localhost last message repeated 10 times
Jun  1 02:59:56 localhost kernel: set_rtc_mmss: can't update from 1 to 59
Jun  1 02:59:58 localhost kernel: set_rtc_mmss: can't update from 1 to 59
Jun  1 03:59:45 localhost kernel: set_rtc_mmss: can't update from 0 to 59
Jun  1 09:29:35 localhost last message repeated 8 times
Jun  1 10:29:43 localhost last message repeated 10 times
《解決方案》

看不出來錯誤,你的系統時間對不
《解決方案》

因為是虛擬機  時間肯定是不對的  ,這有關係嗎?我改下試下
《解決方案》

時間改了,服務重啟后, 也還是不行

[火星人 ] vsftp就是登陸不了,求救已經有541次圍觀

http://coctec.com/docs/service/show-post-21723.html