文章目录
启动失败问题记录
bash
root@armbian:~# systemctl status pure-ftpd.service
● pure-ftpd.service
Loaded: loaded (/etc/init.d/pure-ftpd; generated)
Active: failed (Result: exit-code) since Sun 2024-07-07 23:38:59 CST; 24s ago
Docs: man:systemd-sysv-generator(8)
Process: 178417 ExecStart=/etc/init.d/pure-ftpd start (code=exited, status=2)
CPU: 150ms
Jul 07 23:38:59 armbian systemd[1]: Starting pure-ftpd.service...
Jul 07 23:38:59 armbian pure-ftpd[178417]: Starting ftp server:
Jul 07 23:38:59 armbian pure-ftpd[178425]: /usr/sbin/pure-ftpd-wrapper: Invalid configuration file /etc/pure-ftpd/conf/PureDB: "/etc/pure-ftpd/pureftpd.pdb": No such file
Jul 07 23:38:59 armbian systemd[1]: pure-ftpd.service: Control process exited, code=exited, status=2/INVALIDARGUMENT
Jul 07 23:38:59 armbian systemd[1]: pure-ftpd.service: Failed with result 'exit-code'.
Jul 07 23:38:59 armbian systemd[1]: Failed to start pure-ftpd.service.
- 错误信息显示配置文件"/etc/pure-ftpd/conf/PureDB"无效,因为找不到文件"/etc/pure-ftpd/pureftpd.pdb"
解决命令
- 尝试重新安装pure-ftpd服务
bash
sudo apt-get remove pure-ftpd
sudo apt update
sudo apt-get install pure-ftpd
- 在执行这些命令之前,建议备份配置文件和数据,以防止数据丢失
- 可能还是失败,仍然显示配置文件找不到,那就执行第二步骤
-
手动创建配置文件并重新启动pure-ftpd服务
bash# 1 备份并删除原有的配置文件(如果存在) sudo mv /etc/pure-ftpd/conf/PureDB /etc/pure-ftpd/conf/PureDB.bak # 2 创建一个新的配置文件 sudo touch /etc/pure-ftpd/conf/PureDB # 3 重新启动pure-ftpd服务 sudo systemctl restart pure-ftpd.service # 4 查看服务状态 sudo systemctl status pure-ftpd.service
-
操作实践记录
bashroot@armbian:~# sudo mv /etc/pure-ftpd/conf/PureDB /etc/pure-ftpd/conf/PureDB.bak root@armbian:~# sudo touch /etc/pure-ftpd/conf/PureDB root@armbian:~# sudo systemctl restart pure-ftpd.service root@armbian:~# sudo systemctl status pure-ftpd.service ● pure-ftpd.service Loaded: loaded (/etc/init.d/pure-ftpd; generated) Active: active (running) since Sun 2024-07-07 23:48:47 CST; 12s ago Docs: man:systemd-sysv-generator(8) Process: 190760 ExecStart=/etc/init.d/pure-ftpd start (code=exited, status=0/SUCCESS) Tasks: 1 (limit: 4384) Memory: 840.0K CPU: 184ms CGroup: /system.slice/pure-ftpd.service └─190769 pure-ftpd (SERVER) Jul 07 23:48:47 armbian systemd[1]: Starting pure-ftpd.service... Jul 07 23:48:47 armbian pure-ftpd[190760]: Starting ftp server: Jul 07 23:48:47 armbian pure-ftpd[190768]: Running: /usr/sbin/pure-ftpd -l pam -u 1000 -J HIGH -E -O clf:/var/log/pure-ftpd/transfer.log -B Jul 07 23:48:47 armbian systemd[1]: Started pure-ftpd.service.