LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1121|回复: 7

how to start vsftpd in standalone mode?

[复制链接]
发表于 2003-7-27 20:51:54 | 显示全部楼层 |阅读模式
rt.
发表于 2003-7-28 01:11:21 | 显示全部楼层
你安装了vsftpd的话,应该有一个daemon的教本在/etc/init.d的下面,名字跟vsftpd相同。
然后,你可以通过chkconfig vsftpd来查看是否有有这个程序的执行脚本,否则,vsftpd就一定是以inted或者xinetd方式运行了。
如果chkconfig vsftpd有,则会显示1:OFF 2:OFF 3:OFF 4:OFF 5:OFF,这些代表运行级别。那你可以通过chkconfig -a vsftpd来让你下一次随系统自动启动。或者可以用/etc/init.d/vsftpd start来启动。
那么,如果没有这个脚本,你就可以通过/usr/bin/vsftpd来运行。vsftpd后面有参数,你可以参照readme。将上面那句命令添加到/etc/init.d/boot.local即可。
 楼主| 发表于 2003-7-28 07:05:25 | 显示全部楼层
linux:/etc/init.d # chkconfig vsftpd
vsftpd  xinetd
linux:/etc/init.d # chkconfig -a vsftpd
vsftpd: not a runlevel service
linux:/etc/init.d # locate vsftpd
/etc/pam.d/vsftpd
/etc/vsftpd.conf
/etc/xinetd.d/vsftpd
/usr/sbin/vsftpd
linux:/etc/init.d # /usr/sbin/vsftpd
500 OOPS: could not bind listening socket

so my system want to start vsftpd at xinetd mode.But failed.
I don't care vsftpd start standalone mode or xinetd mode.
I just want it starts service.

So I want to understand how to start at standalone mode and inetd mode.
发表于 2003-7-28 10:39:17 | 显示全部楼层
打开/etc/inetd.conf文件,找到以下地方:
# These are standard services.
#
# ftp        stream        tcp        nowait        root        /usr/sbin/tcpd        in.ftpd
# ftp        stream        tcp        nowait        root        /usr/sbin/tcpd        vsftpd
ftp        stream        tcp        nowait        root        /usr/sbin/tcpd        proftpd 我用的

你只要将vsftpd前面的#去掉即可。注意不要同时启动inetd,xinetd。
可以用chkconfig -a inetd来启动inetd服务。
发表于 2003-7-28 10:48:55 | 显示全部楼层
打开YAST,找到图中的地方。你呀注意,我用的是proftp,所以我启动了proftp,方法来自其howto。
所以,第一步,你要启动inetd服务;
第二步,你要在inetd中启动vsftpd;
第三步,配置你的vsftpd的文件,应该在/etc/vsftpd.conf中,你可以在坛子中搜索一下,北南写过一个很详细的帖子。
http://www.linuxsir.cn/forum.php ... 15&pagenumber=1
第四步,如果你开放了防火墙,你需要在防火墙的设置中打开21号端口。如果你采用路由方式桥接你的ADSL猫,你可以做一个NAT,将每次ISP给你的公网地址转换到你的局域网IP开放FTP的主机。
第五步,在局域网中测试,邀请你的朋友在公网上测试。
第六步,做好安全设置,检查你的帐号权限,特别是对系统文件的读写权限。将FTP组其他用户设置为false,upload:x:501:49::/srv/ftp/incoming/upload:/bin/false,这个文件在/etc/passwd中。
第七步,GOOD LUCK!
 楼主| 发表于 2003-7-28 13:10:08 | 显示全部楼层
lftp 192.168.32.57:~> ls
ls: Login failed: 500 OOPS: vsftpd: refusing to run with writable anonymous root
/etc/xinetd.d/vsftpd:
service ftp
{
#        server_args             =
        log_on_success          += DURATION USERID
        log_on_failure          += USERID
        nice                    = 10
        socket_type     = stream
        protocol        = tcp
        wait            = no
        user            = root
        server          = /usr/sbin/vsftpd
}


linux:/etc/xinetd.d # lftp 192.168.32.57
lftp 192.168.32.57:~> ls
`ls' at 0 [Delaying before reconnect: 28]
Interrupt
service ftp
{
#        server_args             =
        log_on_success          += DURATION USERID
        log_on_failure          += USERID
        nice                    = 10
        socket_type     = stream
        protocol        = tcp
        wait            = no
        user            = ftp
        server          = /usr/sbin/vsftpd
}



When I use user ftp to start vsftpd service,I cann't connect!why.
linux:/etc/xinetd.d # useradd ftp
useradd: user ftp exists
发表于 2003-7-28 18:54:25 | 显示全部楼层
ftp是系统已经有的用户,你要好好看看howto.应该新建立一个ftp组的用户,而不是ftp这个用户。
 楼主| 发表于 2003-7-29 01:39:35 | 显示全部楼层
The problem is that I set the /srv/ftp dir to writable.
Now, all settled.Thanks a lot.
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表