今天在安装完vsftpd后启动,报错如下:
[root@zq1 vsftp_user_conf]# /etc/init.d/vsftpd restart
关闭 vsftpd: [失败]
为 vsftpd 启动 vsftpd:500 OOPS: bad bool value in config file for: anonymous_enable
[失败]
网上查了很多,都说是anonymous_enable后面有空格,但是使用vim查看后面确实没有空格,还特意加了一个#证明,还是不能正常启动。后来发现了一篇文章
说在windows上使用notepad++可以查看到配置文件是否有空格。
下载notepad++安装。
将vsftpd配置文件/etc/vsftpd/vsftpd.conf文件拷贝到windows下,使用notepad++打开,
在视图里选择“”显示所有字符“”
检测一看,anonymous_enable后面确实有空格,如下
# Allow anonymous FTP? (Beware - allowed by default if you comment this out).
anonymous_enable=NO LF
#
# Uncomment this to allow local users to log in.
于是将LF前的空格去掉,然后传到vsftpd的配置文件下,再次启动就正常了。
另外还要保证notepad++的编辑里的文档格式转换是linux识别UNIX格式