解决vsftpd:cannot open config file:-l的问题

来源:互联网 发布:知返全文番外txt下载 编辑:程序博客网 时间:2024/05/17 00:12

昨天莫名奇妙suse的vsftpd就起不来了,连接时提示cannot open config file:-l 。在Google上一搜,这个问题一大推,但是没有明确的答案。乱七八糟捣鼓了一天,还是不得行,恼火啊。晚上回去后专门在csdn的blog上搜,搜出来的果然更有质量些。有了一点头绪。我现在的配置是通过xinetd来启动vsftpd。xinetd的配置文件是/etc/xinetd.d/vsftpd,vsftpd的配置文件是/etc/vsftpd.conf。今天下午捣鼓了一下,居然好了。下面贴出配置:

# default: off
# 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
{
        disable = no
#        log_on_success          += DURATION USERID
#        log_on_failure          += USERID
#        nice                    = 10
        socket_type     = stream
        protocol        = tcp
        wait            = no
        user            = root
        group           = root
        server          = /usr/sbin/vsftpd
        server_args     = /etc/vsftpd.conf
}

disable = no是我家的。server_args原来的参数是:server_args=-l,估计xinetd就是从这里找vsftpd的配置文件,所以老是open config file:-l 。然后我就把这个参数改成:server_args = /etc/vsftpd.conf。

vsftpd原来被我删了,现在重新写了一个:

listen=NO
use_localtime=YES
connect_from_port_20=YES
pam_service_name=vsftpd
tcp_wrappers=YES
anonymous_enable=YES
local_enable=YES
write_enable=YES
local_umask=022

按理说现在应该把xinetd重启就好了。结果居然不知道怎么重启,什么xinetd restart,或者service xinetd restart,都试过,结果都是command not found。suse里面没有这种命令!然后在网上搜了一下,有个人说了:

在SuSE下等价于redhat中的service命令的是什么,例如重启samba只要service smb start,不知道在SUSE下怎么做?

答:
/sbin/下面根本就没有service这个程序

SuSE 里面的服务脚本都是用 rc 开头的。比如 rcapache2, rcsmb, rcnfs. 比用

Technorati 标签: SUSE,vsftpd:cannot open config file

service 命令少敲好几个字符呢。

哦,这下:rcxinetd restart,然后重新连接,好了。suse linux连命令都与别人不一样啊。