温馨提示×

Debian vsftp如何重启

小樊
41
2026-07-30 16:13:18
栏目: 智能运维

在 Debian 系统中,vsftpd(Very Secure FTP Daemon)的重启方法取决于你使用的是 SysVinit 还是 systemd(Debian 8 及以后版本默认是 systemd)。

✅ 最常见(Debian 8+,systemd)

sudo systemctl restart vsftpd

查看状态:

sudo systemctl status vsftpd

设置开机自启(可选):

sudo systemctl enable vsftpd

✅ 较老版本(Debian 7 及之前,SysVinit)

sudo service vsftpd restart

或:

sudo /etc/init.d/vsftpd restart

✅ 验证 vsftpd 是否正在运行

ps aux | grep vsftpd

sudo systemctl status vsftpd

✅ 检查配置文件是否有误

在重启前建议先检查配置:

sudo vsftpd -olisten=NO /etc/vsftpd.conf

如果无输出,说明配置文件基本没问题。


✅ 常见问题

  • 端口冲突:vsftpd 默认使用 21 端口,确保未被占用
  • 配置错误:修改 /etc/vsftpd.conf 后必须重启才生效
  • 防火墙:确保防火墙放行 FTP 端口(21、以及被动模式端口)

如果你愿意,可以把你的 Debian 版本(cat /etc/debian_version)或报错信息贴出来,我可以帮你具体排查。

0