虚机配置vsftpd后重启失败
systemctl restart vsftpd.service
提示错误信息:
Job for vsftpd.service failed because the control process exited with error code. See "systemctl status vsftpd.service" and "journalctl -xe" for details.
查看vsftpd的状态:
[root@localhost ~]# systemctl status vsftpd.service
● vsftpd.service - Vsftpd ftp daemon
Loaded: loaded (/usr/lib/systemd/system/vsftpd.service; disabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Thu 2023-05-18 22:22:32 CST; 13s ago
Process: 19429 ExecStart=/usr/sbin/vsftpd /etc/vsftpd/vsftpd.conf (code=exited, status=2)
May 18 22:22:32 localhost.localdomain systemd[1]: Starting Vsftpd ftp daemon...
May 18 22:22:32 localhost.localdomain vsftpd[19429]: 500 OOPS: bad bool value in config file for: userlist_enable
May 18 22:22:32 localhost.localdomain systemd[1]: vsftpd.service: control process exited, code=exited status=2
May 18 22:22:32 localhost.localdomain systemd[1]: Failed to start Vsftpd ftp daemon.
May 18 22:22:32 localhost.localdomain systemd[1]: Unit vsftpd.service entered failed state.
May 18 22:22:32 localhost.localdomain systemd[1]: vsftpd.service failed.
[root@localhost ~]#
[root@localhost ~]#
里面找到了这个错误信息:
500 OOPS: bad bool value in config file for: userlist_enable
这是因为vsftpd.conf文件里某一行后边加了一个空格
挨个检查发现确实有一行编辑时结尾多了一个空格,修改保存后重启正常。
[root@localhost ~]#
[root@localhost ~]#
[root@localhost ~]#
[root@localhost ~]# ^C
[root@localhost ~]# systemctl restart vsftpd.service
[root@localhost ~]# ^C
[root@localhost ~]# ^C
[root@localhost ~]# ^C
[root@localhost ~]# systemctl status vsftpd.service
● vsftpd.service - Vsftpd ftp daemon
Loaded: loaded (/usr/lib/systemd/system/vsftpd.service; disabled; vendor preset: disabled)
Active: active (running) since Thu 2023-05-18 22:25:43 CST; 5min ago
Process: 19489 ExecStart=/usr/sbin/vsftpd /etc/vsftpd/vsftpd.conf (code=exited, status=0/SUCCESS)
Main PID: 19490 (vsftpd)
CGroup: /system.slice/vsftpd.service
└─19490 /usr/sbin/vsftpd /etc/vsftpd/vsftpd.conf
May 18 22:25:43 localhost.localdomain systemd[1]: Starting Vsftpd ftp daemon...
May 18 22:25:43 localhost.localdomain systemd[1]: Started Vsftpd ftp daemon.
[root@localhost ~]#
来源地址:https://blog.csdn.net/weixin_45371131/article/details/130746334