升级 Debian 上的 FTP 服务器,通常取决于你使用的具体 FTP 服务软件(如 vsftpd、ProFTPD 或 Pure-FTPd)。下面以最常见情况为主,并给出通用步骤。
先确认你正在使用哪种 FTP 服务器:
dpkg -l | grep -E 'vsftpd|proftpd|pure-ftpd'
或查看运行中的服务:
ps aux | grep ftp
sudo apt update
sudo apt upgrade
或完整升级(Debian 大版本升级时用):
sudo apt full-upgrade
✅ 这会自动升级 FTP 服务器。
sudo apt install --only-upgrade vsftpd
检查版本:
vsftpd -v
常见路径:
/etc/vsftpd.confvsftpdsudo apt install --only-upgrade proftpd-core
检查版本:
proftpd --version
配置文件:
/etc/proftpd/proftpd.conf重启服务:
sudo systemctl restart proftpd
sudo apt install --only-upgrade pure-ftpd
重启服务:
sudo systemctl restart pure-ftpd
如果你是想从 Debian 10 → 11 / 11 → 12 升级系统:
sudo nano /etc/apt/sources.list
示例(Debian 12 Bookworm):
deb http://deb.debian.org/debian bookworm main
sudo apt update
sudo apt upgrade
sudo apt full-upgrade
⚠️ 跨版本升级前务必备份配置和服务。
sudo systemctl status vsftpd
ss -antp | grep :21
ls -l /etc/vsftpd.conf
/etc/vsftpd.conflocal_enable=YES
write_enable=YES
sudo ufw allow 21/tcp
确保配置被动端口并放行防火墙。
ssl_enable=YES
如果你愿意,可以告诉我:
cat /etc/os-release)我可以给你精确到命令级别的方案。