发新话题
打印

[ftp] 求助vsftp ftp: connect: Connection refused

求助vsftp ftp: connect: Connection refused

[root@localhost ~]# ftp 127.0.0.1
ftp: connect: Connection refused

/etc/vsftpd/vsftpd.conf
如下:# 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
#
# 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=077
#
# 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 turning on ascii_download_enable enables malicious remote parties
# to consume your I/O resources, by issuing the command "SIZE /big/file" in
#ASCII mode.
# These ASCII options are split into upload and download because you may wish
# to enable ASCII uploads (to prevent uploaded scripts etc. from breaking),
# without the DoS risk of SIZE and ASCII downloads. ASCII mangling should be
# on the client anyway..
ascii_upload_enable=YES
ascii_download_enable=YES
#
# You may fully customise the login banner string:
ftpd_banner=Welcome to weijian FTP service.
#
# 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_local_usr=yes
chroot_list_enable=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

pam_service_name=vsftpd
userlist_enable=YES
#enable for standalone mode
listen=YES
tcp_wrappers=YES

/etc/vsftpd.ftpusers
# Users that are not allowed to login via ftp
#root
bin
daemon
adm
lp
sync
shutdown
halt
mail
news
uucp
operator
games
nobody


/etc/vsftpd_userlist
如下

# vsftpd userlist
# If userlist_deny=NO, only allow users in this file
# If userlist_deny=YES (default), never allow users in this file, and
# do not even prompt for a password.
# Note that the default vsftpd pam config also checks /etc/vsftpd.ftpusers
# for users that are denied.
#root
bin
daemon
adm
lp
sync
shutdown
halt
mail
news
uucp
operator
games
nobody

老是配置不好
很头疼
请指点一下
redhat AS 4
自带vsftp

TOP

你启动了vsftpd服务吗?
开源,人人为我,我为人人!

TOP

ps的结果:
USER       PID %CPU %MEM   VSZ  RSS TTY      STAT START   TIME COMMAND
root         1  0.0  0.0  2572  560 ?        S    22:35   0:00 init [5]                                             
root         2  0.0  0.0     0    0 ?        SN   22   0:00 [ksoftirqd/0]
root         3  0.0  0.0     0    0 ?        S<   22:35   0:00 [events/0]
root         4  0.0  0.0     0    0 ?        S<   22   0:00 [khelper]
root         5  0.0  0.0     0    0 ?        S<   22:35   0:00 [kacpid]
root        18  0.0  0.0     0    0 ?        S<   22   0:00 [kblockd/0]
root        28  0.0  0.0     0    0 ?        S    22:35   0:00 [pdflush]
root        29  0.0  0.0     0    0 ?        S    22   0:01 [pdflush]
root        31  0.0  0.0     0    0 ?        S<   22:35   0:00 [aio/0]
root        19  0.0  0.0     0    0 ?        S    22   0:00 [khubd]
root        30  0.0  0.0     0    0 ?        S    22:35   0:00 [kswapd0]
root       105  0.0  0.0     0    0 ?        S    22   0:00 [kseriod]
root       178  0.0  0.0     0    0 ?        S    22:35   0:00 [scsi_eh_0]
root       192  0.0  0.0     0    0 ?        S<   22   0:00 [kmirrord/0]
root       201  0.1  0.0     0    0 ?        S    22:35   0:02 [kjournald]
root       767  0.0  0.0  2456  448 ?        S<s  22:35   0:00 udevd
root      1548  0.0  0.2  5404 1612 ?        S<s  22:36   0:00 /sbin/dhclient -1 -q -lf /var/lib/dhcp/dhclient-eth0.leases -pf /var/run/dhclient-eth0.pid eth0
root      1731  0.0  0.2  5676 1616 ?        S<s  22:36   0:00 /sbin/dhclient -1 -q -lf /var/lib/dhcp/dhclient-eth0.leases -pf /var/run/dhclient-eth0.pid eth0
root      1816  0.0  0.0     0    0 ?        S    22:36   0:00 [kjournald]
root      2274  0.0  0.2  4760 1548 ?        Ss   22:36   0:00 /sbin/dhclient -1 -q -lf /var/lib/dhcp/dhclient-eth0.leases -pf /var/run/dhclient-eth0.pid eth0
root      2322  0.0  0.0  2284  592 ?        Ss   22:36   0:00 syslogd -m 0
root      2326  0.0  0.0  3144  484 ?        Ss   22:36   0:00 klogd -x
rpc       2347  0.0  0.0  2520  580 ?        Ss   22:36   0:00 portmap
rpcuser   2367  0.0  0.2  4188 1284 ?        Ss   22:36   0:00 rpc.statd
root      2400  0.0  0.1  4088 1008 ?        Ss   22:36   0:00 rpc.idmapd
nscd      2470  0.0  0.2 15360 1592 ?        Ssl  22:37   0:00 /usr/sbin/nscd
root      2496  0.0  0.0  2020  556 ?        Ss   22:37   0:00 /usr/sbin/acpid
root      2508  0.0  0.3 11052 2312 ?        Ss   22:37   0:00 cupsd
root      2544  0.0  0.2  4628 1632 ?        Ss   22:37   0:00 /usr/sbin/sshd
root      2559  0.0  0.1  4500  860 ?        Ss   22:37   0:00 xinetd -stayalive -pidfile /var/run/xinetd.pid
root      2582  0.0  0.1  6584 1128 ?        S    22:37   0:00 /bin/sh /usr/bin/mysqld_safe --defaults-file=/etc/my.cnf
mysql     2609  0.0  2.7 123584 17372 ?      Sl   22:37   0:00 /usr/libexec/mysqld --defaults-file=/etc/my.cnf --basedir=/usr --datadir=/var/lib/mysql --user=mysql --pid-file=/var/run/mysqld/mysqld.pid --skip-locking --socket=/var/lib/mysql/mysql.sock
root      2646  0.0  0.4  8552 3012 ?        Ss   22:37   0:00 sendmail: accepting connections
smmsp     2654  0.0  0.4  7516 2576 ?        Ss   22:37   0:00 sendmail: Queue runner@01:00:00 for /var/spool/clientmqueue
root      2665  0.0  0.0  3008  544 ?        Ss   22:37   0:00 gpm -m /dev/input/mice -t imps2
root      2676  0.0  1.5 18840 9776 ?        Ss   22:37   0:01 /usr/sbin/httpd
htt       2706  0.0  0.0  3188  332 ?        Ss   22:37   0:00 /usr/sbin/htt -retryonerror 0
htt       2707  0.0  0.6 50692 4184 ?        Sl   22:37   0:00 htt_server -nodaemon
root      2717  0.0  0.1  6164  776 ?        Ss   22:37   0:00 crond
apache    2741  0.0  1.5 18840 9796 ?        S    22:37   0:00 /usr/sbin/httpd
apache    2742  0.0  1.5 18840 9796 ?        S    22:37   0:00 /usr/sbin/httpd
apache    2743  0.0  1.5 18840 9796 ?        S    22:37   0:00 /usr/sbin/httpd
apache    2748  0.0  1.5 18840 9796 ?        S    22:37   0:00 /usr/sbin/httpd
apache    2749  0.0  1.5 18840 9796 ?        S    22:37   0:00 /usr/sbin/httpd
apache    2750  0.0  1.5 18840 9796 ?        S    22:37   0:00 /usr/sbin/httpd
apache    2751  0.0  1.5 18840 9796 ?        S    22:37   0:00 /usr/sbin/httpd
apache    2752  0.0  1.5 18840 9796 ?        S    22:37   0:00 /usr/sbin/httpd
xfs       2753  0.0  0.2  5300 1552 ?        Ss   22:37   0:00 xfs -droppriv -daemon
root      2763  0.0  0.3 10676 2288 ?        Ss   22:37   0:00 winbindd
root      2764  0.0  0.3 10428 2004 ?        S    22:37   0:00 winbindd
root      2774  0.0  0.0  2176  636 ?        SNs  22:37   0:00 anacron -s
daemon    2783  0.0  0.0  3256  596 ?        Ss   22:37   0:00 /usr/sbin/atd
dbus      2802  0.0  0.1  3756 1168 ?        Ss   22:37   0:00 dbus-daemon-1 --system
root      2815  0.0  0.1  3328 1044 ?        Ss   22:37   0:00 cups-config-daemon
root      2826  0.2  0.7  7156 4524 ?        Ss   22:37   0:05 hald
root      2958  0.0  0.7  7284 4792 ?        Ss   22:37   0:00 /usr/bin/perl /usr/libexec/usermin/miniserv.pl /etc/usermin/miniserv.conf
root      3002  0.0  0.9 11000 5876 ?        Ss   22:37   0:00 /usr/bin/perl /usr/libexec/webmin/miniserv.pl /etc/webmin/miniserv.conf
root      3018  0.0  0.0  2700  408 tty1     Ss+  22:37   0:00 /sbin/mingetty tty1
root      3058  0.0  0.0  2964  408 tty2     Ss+  22:37   0:00 /sbin/mingetty tty2
root      3063  0.0  0.0  2320  408 tty3     Ss+  22:37   0:00 /sbin/mingetty tty3
root      3064  0.0  0.0  2700  408 tty4     Ss+  22:37   0:00 /sbin/mingetty tty4
root      3261  0.0  0.0  1672  404 tty5     Ss+  22:37   0:00 /sbin/mingetty tty5
root      3306  0.0  0.0  2300  408 tty6     Ss+  22:37   0:00 /sbin/mingetty tty6
root      3337  0.0  0.3 13816 2324 ?        Ss   22:37   0:00 /usr/bin/gdm-binary -nodaemon
root      3461  0.0  0.4 14484 3040 ?        S    22:37   0:00 /usr/bin/gdm-binary -nodaemon
root      3466  9.1  3.0 24208 19600 ?       S    22:37   3:01 /usr/X11R6/bin/X :0 -audit 0 -auth /var/gdm/:0.Xauth -nolisten tcp vt7
root      3543  0.0  1.7 32652 11156 ?       Ss   22:38   0:01 /usr/bin/gnome-session
root      3567  0.1  1.3 14148 8340 ?        S    22:38   0:03 /usr/libexec/gconfd-2 13
root      3568  0.0  0.1  6008 1084 ?        S    22:38   0:00 /bin/bash /etc/X11/xdm/Xsession default
root      3572  0.0  0.2  6580 1348 ?        S    22:38   0:00 httx
root      3574  0.0  0.5 24352 3368 ?        Sl   22:38   0:00 htt_xbe
root      3577  0.0  0.1  4620 1132 ?        Ss   22:38   0:00 /usr/bin/ssh-agent -s
root      3610  0.0  0.1  2660  656 ?        S    22:38   0:00 /usr/bin/dbus-launch --exit-with-session /etc/X11/xinit/Xclients
root      3611  0.0  0.1  4092 1124 ?        Ss   22:38   0:00 dbus-daemon-1 --fork --print-pid 8 --print-address 6 --session
root      3617  0.0  0.1  4028  796 ?        S    22:38   0:00 /usr/bin/gnome-keyring-daemon
root      3620  0.0  0.3 10000 2376 ?        Ss   22:38   0:00 /usr/libexec/bonobo-activation-server --ac-activate --ior-output-fd=18
root      3621  0.0  0.9 24348 6372 ?        S    22:38   0:00 com.redhat.chinput.status
root      3624  0.2  1.4 25968 9364 ?        Ss   22:38   0:05 metacity --sm-save-file 1134308434-3180-3196778042.ms
root      3626  0.0  1.1 20820 7068 ?        S    22:38   0:00 /usr/libexec/gnome-settings-daemon --oaf-activate-iid=OAFIID:GNOME_SettingsDaemon --oaf-ior-fd=22
root      3628  0.0  0.9 20348 5820 ?        S    22:38   0:00 /usr/libexec/vino-server --oaf-activate-iid=OAFIID:GNOME_RemoteDesktopServer --oaf-ior-fd=23
root      3634  0.0  0.1  3216  948 ?        S    22:38   0:00 /usr/libexec/gam_server
root      3652  0.0  1.0 19980 6380 ?        Ss   22:38   0:00 gnome-volume-manager --sm-config-prefix /gnome-volume-manager-0K45lo/ --sm-client-id 117f000001000113430602000000031000001 --screen 0
root      3656  0.3  2.9 52148 19072 ?       Rsl  22:38   0:06 nautilus --sm-config-prefix /nautilus-h2gD9Y/ --sm-client-id 117f000001000113430602100000031000003 --screen 0 --no-default-window
root      3658  0.2  2.1 32960 13768 ?       Ss   22:38   0:04 gnome-panel --sm-config-prefix /gnome-panel-l7unch/ --sm-client-id 117f000001000113430602000000031000002 --screen 0
root      3669  0.0  0.5 21892 3616 ?        Sl   22:38   0:00 /usr/libexec/gnome-vfs-daemon --oaf-activate-iid=OAFIID:GNOME_VFS_Daemon_Factory --oaf-ior-fd=28
root      3679  0.0  0.0  3256  544 ?        S    22:38   0:00 /usr/libexec/mapping-daemon
root      3681  0.0  1.1 41824 7536 ?        Ss   22:38   0:00 eggcups --sm-config-prefix /eggcups-XLFSiu/ --sm-client-id 117f000001000113430602200000031000004 --screen 0
root      3686  0.0  0.7 14548 4700 ?        Ss   22:38   0:00 /usr/bin/pam-panel-icon --sm-client-id 117f000001000113430602200000031000005
root      3688  2.9  3.2 35224 20816 ?       RNs  22:38   0:56 /usr/bin/python /usr/bin/rhn-applet-gui --sm-config-prefix /rhn-applet-LcHbhx/ --sm-client-id 117f000001000113430603300000031000006 --screen 0
root      3693  0.0  0.0  2992  424 ?        S    22:38   0:00 /sbin/pam_timestamp_check -d root
root      3696  0.1  1.8 33652 11688 ?       S    22:38   0:02 /usr/libexec/wnck-applet --oaf-activate-iid=OAFIID:GNOME_Wncklet_Factory --oaf-ior-fd=32
root      3698  0.1  1.4 22784 9236 ?        S    22:38   0:02 /usr/libexec/mixer_applet2 --oaf-activate-iid=OAFIID:GNOME_MixerApplet_Factory --oaf-ior-fd=34
root      3700  0.0  1.4 31384 9280 ?        S    22:38   0:00 /usr/libexec/clock-applet --oaf-activate-iid=OAFIID:GNOME_ClockApplet_Factory --oaf-ior-fd=36
root      3702  0.0  1.0 20232 6976 ?        S    22:38   0:00 /usr/libexec/notification-area-applet --oaf-activate-iid=OAFIID:GNOME_NotificationAreaApplet_Factory --oaf-ior-fd=38
root      3704  0.0  1.4 30272 9360 ?        S    22:38   0:00 /usr/libexec/gnome-im-switcher-applet --oaf-activate-iid=OAFIID:GNOME_imswitcher_Factory --oaf-ior-fd=40
root      3706  0.0  0.1  5684 1060 ?        S    22:39   0:00 /bin/sh /usr/lib/firefox-1.0/firefox -UILocale zh-CN
root      3723  0.0  0.1  6364 1064 ?        S    22:39   0:00 /bin/sh /usr/lib/firefox-1.0/run-mozilla.sh /usr/lib/firefox-1.0/firefox-bin -UILocale zh-CN
root      3728  2.8  6.1 116704 39500 ?      Sl   22:39   0:54 /usr/lib/firefox-1.0/firefox-bin -UILocale zh-CN
root      3776  0.0  0.0     0    0 ?        Z    22:46   0:00 [netstat] <defunct>
root      3954  2.5  1.8 47860 12072 ?       Sl   23:10   0:00 /usr/bin/gnome-terminal
root      3956  0.0  0.0  3884  464 ?        S    23:10   0:00 gnome-pty-helper
root      3957  0.4  0.2  7384 1284 pts/1    Ss   23:10   0:00 bash
root      3974  0.0  0.1  3200  720 pts/1    R+   23:10   0:00 ps -aux


没有vsftp
奇怪

TOP

[root@localhost ~]# vsftpd /etc/vsftpd/vsftpd.conf&
[1] 4836
[root@localhost ~]# 500 OOPS: could not bind listening IPv4 socket

[1]+  Exit 1                  vsftpd /etc/vsftpd/vsftpd.conf

500 OOPS: could not bind listening IPv4 socket

如何解决

TOP

看着很费劲啊。

TOP

回复 #3 1345678 的帖子

你想实现什么功能啊?
你那里有好多地方的权利都有冲突,anonymous_enable=YES,
anon_upload_enable=YES
#
anon_mkdir_write_enable=YES

deny_email_enable=YES
userlist_enable=YES

TOP

发新话题