centos7 搭建ftp服务器错误,Job for vsftpd.service failed because the control process exited with error code
问题描述
启动vsftpd服务,报错:Job for vsftpd.service failed because the control process exited with error code. See “systemctl status vsftpd.service” and “journalctl -xe” for details
由于centos7中vsftp的配置文件默认将 listen_ipv6=YES 没有注释掉,而我们目前的网络环境还不支持ipv6,从而导致出现错误无法启动,所以解决方法是将 listen_ipv6=YES更改为:listen_ipv6=NO,或将这一行注释掉。
但是很多人修改后并没有用,我查了很多博客也都没有解决。后面检查发现是我多输了空格导致的。
解决方法:仔细检查你每一行配置后面是否多加了空格,每一行配置后面都不能有空格
附上我的配置文件
# 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.
# When SELinux is enforcing check for SE bool ftp_home_dir
local_enable=YES
#
# Uncomment this to enable any form of FTP