在 Debian 系统中,vsftpd(Very Secure FTP Daemon)的启动方式取决于你使用的 init 系统。目前 Debian 8 及以后版本默认使用 systemd,但老版本可能使用 SysVinit。下面分别说明。
sudo apt update
sudo apt install vsftpd
sudo systemctl start vsftpd
sudo systemctl enable vsftpd
sudo systemctl status vsftpd
✅ 如果看到 active (running) 说明已成功启动。
sudo systemctl stop vsftpd # 停止
sudo systemctl restart vsftpd # 重启
sudo systemctl reload vsftpd # 重载配置(部分配置支持)
sudo service vsftpd start
sudo service vsftpd stop
sudo service vsftpd restart
sudo update-rc.d vsftpd defaults
sudo ss -antp | grep :21
或
sudo netstat -antp | grep :21
/etc/vsftpd.conf
修改配置后需要重启:
sudo systemctl restart vsftpd
sudo ufw allow 21/tcp
如使用被动模式,还需放行被动端口范围(建议在 vsftpd.conf 中指定)。
sudo tail -f /var/log/vsftpd.log
或
sudo journalctl -u vsftpd
如果你愿意,可以告诉我:
cat /etc/debian_version)我可以帮你一步步配置完整的 vsftpd 服务 ✅