论坛风格切换切换到宽版
  • 903阅读
  • 9回复

[问题求助]vsftpd出了点问题,大家进来帮忙 看下吧 [复制链接]

上一主题 下一主题
离线szboy.
 
发帖
2033
C币
-140722
威望
373
贡献值
1
银元
-1
铜钱
4432
人人网人气币
0
只看楼主 倒序阅读 使用道具 楼主  发表于: 2009-05-01

以.前正常,今天 操作的时候竟然无法访问了    健康


servic.e xinetd restart.
启动也正常,下面是配置文件,为什.么一直不能访问 呢?.健康

老是出.现.:ftp: connect: Connection refused(广告)



# Example config fi.le /etc/vsf.tpd.conf<性病>
#
# The default compiled in settings are fairly par.anoid. This sam.ple file.
# loosens things u.p a bit, to make the ftp daemon more u.sable.    外汇
# Please see vsftpd.conf.5 for all compiled in de.f.aults..
#
# READ THIS: This example file is NOT an exhaustive lis.t of v.sftpd options.    美容
# Please read the v.sftpd.conf.5 ma.nual page to get a full idea of vsftpd's虚拟主机
# ca.pabilities..
#
# Allow anonymous FTP? (B.ew.are - allowed by default if you comment this o.ut).    健康
anonymous_ena.ble=no.
#
# Uncomment .this to allow local users. to log in.(广告)
local_enab.le=YES(广告)
#
# Uncomment this to enable any form of FTP wri.te c.ommand..
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 mo.st other ftpd's)            杀毒
local_umask=02.2[成人用品]
#
# Uncomment this to allow the anonymous FTP user to upload file.s. .This only外贸
# has an. effect if the above global. write enable is activ.ated. Also, you will电脑
# obviousl.y need to create a dir.ectory writable by the FTP user.--- 印刷
#ano.n_upload_enable=YES           女人
#
# Uncomment this .if you want the anonymous F.TP user to be able to create.
# new directo.ries.            杀毒
#anon_.mkdir_write_enable.=YES教育
#
# Activate directory messages - mes.sages g.iven to remote users when they    健康
# go into a certain director.y..             汽车
dir.message_enable=YES(        游戏          )
#
# Activate logging .of uploads/download.s..
xferlog_enable=Y.ES外贸
#
# .Make sure PORT transfer connections originate from port 20 .(ftp-data)..
connect_from_port_20=.YES    外汇
#
# If you want, you. c.an arrange for uploaded anonymous files to be owned by域名
# a different user. Note.! Usin.g "root" for uploaded files is not            杀毒
# recommended!
#chown._uploads=YES.
#chown._username=whoever.
#
# You m.ay override where the log .file goes if you like. The def.ault is shown--------------彩票
# below.
#xferlog_file=/var/l.og./vsftpd.log           女人
#
# If you want, you can. have your log file in standard ftpd xferlog for.mat.学习
# Note that the def.ault log file location is /var/log/xferlog in. this case..
#.xferlog_std_format=YES<性病>
#
# You may change the default. value for timing out an idle. session.    健康
#idle_session_time.out=600           鲜花
#
#. You may change the default value for timing .out a data connection.[成人用品]
#.data_co.nnection_timeout=120              乙肝
#
# It is .recommended that you define on yo.ur system a unique user which the虚拟主机
# ftp s.erver can u.se as a totally isolated and unprivileged user..
#.nopriv_user=ftpsecure域名
#
# .Enable this and the server will recognise asynchronous ABOR requests. N.ot.
# recommended fo.r security (the code is non-trivial). Not enabling i.t,.
# ho.wever, may confuse older FTP .clients.(        游戏          )
#async_abor._enable=YES.
#
# By default the server will pretend to .allow. ASCII mode but in fact ignore教育
#. t.he request. Turn on the below o.ptions to have the server actually do ASCII    外汇
# mangling on ..files when in ASCII mode.           女人
# Bewa.re that on some FTP servers, ASCII support allows a denial o.f service服务器
# attack (DoS) via the command "SIZE /big/file" in ASC.II mode.. vsftpd           建材
# predicted this attack and has always bee.n safe, reporting the size of t.he外贸
# raw file.
# ASCII mangling is a hor.rible featu.re of the protocol.外贸
#as.cii_upload_enable=YES              乙肝
#asc.ii_download_.enable=YES.
#
# You may. fully customise the logi.n banner string:.
#ftpd_banner=Welcome t.o blah .FTP service.学习
#
# You m..ay specify a file of disallowed anonymous e-.mail addresses. Apparently.
# useful for .comb.atting certain DoS attacks..
#deny_email_enabl.e=YES            杀毒
# (de.fault follows).
#bann.ed_email_f.ile=/etc/vsftpd.banned_emails投资
#
# You may s.pecify an explicit list of l.ocal users to chroot() to their home              乙肝
# dir.ectory. If c.hroot_local_user is YES, then this list becomes a list of[成人用品]
# users to N.OT chroot()..
#chroot_list_enable.=YES            杀毒
# (default fo.llows)--------------彩票
#chroot_list_file=/etc/.vsftpd..chroot_list.
#
# Yo.u may activate the "-R" option t.o the builtin ls. This is disabled by             电子
# default to avoid. .remote users being able to cause excessive I/O on large           女人
# si.tes. Howe.ver, some broken FTP clients such as "ncftp" and "mirror" as.sume.
# the presen.ce of the "-R" option, so. there is. a strong case for enabling it.--------------彩票
#ls_recurse_enable.=YES           女人
#
# When "listen" direc.tive is enabled, vsftpd runs in standalone mod.e and              乙肝
#. listens on IPv4 sockets. This directive canno.t be used in conjunction教育
# with the listen_ipv6 directiv..e.          婚庆
listen=YES
#
# .This dire.cti.ve enables listening on IPv6 sockets. To listen on IPv4 and IPv6.
# sockets, you must r.un two copies of vsftpd whith tw.o configuration files.    外汇
# Make. sure, that one of the listen options is comme.nted !<性病>


下面的是vsft.pd文件的内容             电子


# default: on
# description:
#   The vs.ftpd FTP server serves FTP connections.. It uses             汽车
#   normal, unencrypted usern.am.es and passwords for authentication.<性病>
# vs.ftpd is desig.ned to be secure.           鲜花
service ftp
{
        socket_ty.pe.             = stream投资
        wait          .        .  = no[成人用品]
   .     user                    = r.oot--------------彩票
        server ..                 = /usr/local/sbin/vsftpd    健康
#    .   server_args  .           =.
#       log._on_success          += DURATIO.N USERID电脑
#    .   log_on_failure  .        += USERID             汽车
        nice            .   .     = 10教育
        disable    .         .    = yes    美容
}

[ 本帖最后由 zh.anghui625 于 .2009-3-24 18:47 编辑 ]          婚庆

评价一下你浏览此帖子的感受

精彩

感动

搞笑

开心

愤怒

无聊

灌水
离线白乐天.
发帖
2018
C币
-140359
威望
350
贡献值
1
银元
-3
铜钱
4426
人人网人气币
0
只看该作者 沙发  发表于: 2010-04-13
Re:vsftpd出了点问题,大家进来帮忙
service vsftpd start

发帖
1844
C币
-236143
威望
320
贡献值
1
银元
-2
铜钱
4095
人人网人气币
0
只看该作者 板凳  发表于: 2010-04-13
Re:vsftpd出了点问题,大家进来帮忙
根本就无法识别

离线baifebbb.
发帖
2129
C币
-152192
威望
413
贡献值
1
银元
-1
铜钱
4801
人人网人气币
0
只看该作者 地板  发表于: 2010-04-13
Re:vsftpd出了点问题,大家进来帮忙
xinetd服务跟vsftpd有关吗?

1、service vsftpd status  看看vsftpd是否启动;
2、netstat -an |grep "21"  看看21是否处于监听状态;
3、防火墙规则呢?

离线acmilanajax.
发帖
2104
C币
-593911
威望
388
贡献值
3
银元
-1
铜钱
4730
人人网人气币
0
只看该作者 4楼 发表于: 2010-04-13
Re:vsftpd出了点问题,大家进来帮忙
# default: on
# description:
#   The vsftpd FTP server serves FTP connections. It uses
#   normal, unencrypted usernames and passwords for authentication.
# vsftpd is designed to be secure.
service ftp
{
        socket_type             = stream
        wait                    = no
        user                    = root
        server                  = /usr/local/sbin/vsftpd
#       server_args             =
#       log_on_success          += DURATION USERID
#       log_on_failure          += USERID
        nice                    = 10
        disable                 = yes
}

离线日光兰.
发帖
1968
C币
-235780
威望
320
贡献值
1
银元
-2
铜钱
4252
人人网人气币
0
只看该作者 5楼 发表于: 2010-04-13
Re:vsftpd出了点问题,大家进来帮忙
有关,vsftpd有两种启动方式,独立监听和通过xinetd监听。
通过xinetd方式在访问量小的时候占用资源比较少。
访问量大的时候独立监听占用资源少。

楼主的vsftpd通过xinetd监听,却在xinetd的vsftpd配置文件里设置了disable = yes,能访问才怪...

离线ayumilove.
发帖
2035
C币
-152549
威望
351
贡献值
1
银元
0
铜钱
4548
人人网人气币
0
只看该作者 6楼 发表于: 2010-04-13
输入

输入service vsftpd status  看看vsftpd是否启动;未被识别的服务

查看21端口是这样

unix  3      [ ]         STREAM     CONNECTED     12821  /tmp/orbit-root/linc-c48-0-603c65aa9f4b7
unix  3      [ ]         STREAM     CONNECTED     12721  /tmp/orbit-root/linc-cbe-0-1d702f3f1d4f5
unix  3      [ ]         STREAM     CONNECTED     12321  /tmp/orbit-root/linc-c7b-0-7a0e235ebd781
unix  3      [ ]         STREAM     CONNECTED     11321

离线gbbgbb.
发帖
2003
C币
-60860
威望
359
贡献值
1
银元
-2
铜钱
4504
人人网人气币
0
只看该作者 7楼 发表于: 2010-04-13
Re:vsftpd出了点问题,大家进来帮忙
因为xinetd已经启动了vsftpd,而vsftpd设置成了stardalone模式,所以,先
停止xinetd服务, service xinetd stop ,然后 /usr/local/sbin/vsftpd &
启动ftp服务
500 OOPS: vsftpd: refusing to run with writable anonymous root
用chmod 775 /var/ftp,就可以登入了
比如您想让匿名用户上传和下载都在/var/ftp/pub,就可以把/var/ftp/pub的权限打开,如果没有这个目录,您要自己建一个;
[root@localhost ~]# mkdir /var/ftp/pub
[root@localhost ~]# chmod -R 777 /var/ftp/pub 这表示ftp用户的家目录的权限不对,应该改过才对;
[root@localhost ~]# more /etc/passwd |grep ftp
ftp:1000:1000:FTP User:/var/ftp:/sbin/nologin
我们发现ftp用户的家目录在/var/ftp,就是这个/var/ftp的权限不对所致,这个目录的权限是不能打开所有权限的;是您运行了chmod 777 /var/ftp所致;如果没有ftp用户这个家目录,当然您要自己建一个;
如下FTP用户的家目录是不能针对所有用户、用户组、其它用户组完全开放;
[root@localhost ~]# ls -ld /var/ftp
drwxrwxrwx 3 root root 4096 2005-03-23 /var/ftp
修正这个错误,应该用下面的办法;
[root@localhost ~]# chown root:root /var/ftp
[root@localhost ~]# chmod 755 /var/ftp
有的弟兄可能会说,那匿名用户的可读、可下载、可上传怎么办呢?这也简单,在/var/ftp下再建一个目录,权限是777的就行了,再改一改vsftpd.conf就OK了;没有什么难的;
vsFTPd出于安全考虑,是不准让ftp用户的家目录的权限是完全没有限制的
vsftp细节问题: 500 OOPS: could not bind listening IPv4 socket 解决办法2007年08月10日 星期五 12:56
第一. 执行/usr/local/sbin/vsftpd &之后
vsftpd 的错误提示:500 OOPS: could not bind listening IPv4 socket 遇到这个问题我在通过编译源代码后安装vsftpd的时候遇到的,在这以前我已经通过rpm方式安装过了vsftp
因此其配置文件/etc/xinet.d/vsftpd还在并且是自启动的,也就是说是XINET模式;但是/etc/rc.local中又写入
了启动脚本,因此便发生了冲突,只需要关闭它们中的一个问题就解决了。
有以下两种方式:1.使用XINET模式
去掉/etc/rc.local文件中的vsftpd的启动脚本/usr/local/sbin/vsftp &
运行service vsftpd restart命令启动vsftpd
2.使用STANDALONE独立模式
在服务器的负担比较重的情况下最好用这个模式
chkconfig vsftpd --level 3 off
或者直接修改/etc/xinetd.d/vsftpd文件,把disable=no改成disable=yes就行了!
第二.
我曾经也碰到过这样的问题,
VSFTPD我是自己编译的,在论坛上许多文章说是编译使用的是XINETD模式,所以只要在/etc/xinetd.d/vsftpd文件中,把disable=no改成YES就行了!
还有就是在/etc/vsftpd.conf文件添加listen=yes这样就改成了STANDALONE独立模式!
重启!OK




上面这段文字是我在一个博客上看到的,用他上面的方法竟然解决了,还要先停止xinetd,后 /usr/local/sbin/vsftpd & ,这是为什么呢?初学这个,真得很难搞。

离线yangjfa.
发帖
2064
C币
-152459
威望
378
贡献值
1
银元
-1
铜钱
4551
人人网人气币
0
只看该作者 8楼 发表于: 2010-04-13
Re:vsftpd出了点问题,大家进来帮忙
请检查日志并将日志中的信息放上来

离线绯闻.
发帖
2135
C币
-604579
威望
374
贡献值
1
银元
-2
铜钱
4727
人人网人气币
0
只看该作者 9楼 发表于: 2010-04-13
Re:vsftpd出了点问题,大家进来帮忙
日志在哪里可以看啊?
快速回复
限100 字节
如果您在写长篇帖子又不马上发表,建议存为草稿
 
上一个 下一个