在 Ubuntu 下使用 FileZilla 时常见的“错误”有很多种,修复方法取决于具体报错内容。下面我按常见错误类型给你一套排查与修复思路,你可以对照使用。
常见提示:
Error: Connection timed outCould not connect to server解决方法:
# 检查网络
ping 服务器IP
# 检查端口(如 21 / 22)
telnet 服务器IP 21
# 或
ssh 服务器IP
✅ 确认:
sudo ufw allow 21
sudo ufw allow 22
解决方法:
sudo cat /etc/ftpusers
如果该用户在列表中,移除即可
FileZilla 报错:
Failed to retrieve directory listing解决方法: 在 FileZilla 中:
站点管理器 → 传输设置 → 改为“被动模式”
或在服务器端配置被动端口(vsftpd 示例):
sudo nano /etc/vsftpd.conf
添加:
pasv_min_port=40000
pasv_max_port=50000
然后:
sudo ufw allow 40000:50000/tcp
sudo systemctl restart vsftpd
解决方法:
# 重装 FileZilla
sudo apt remove filezilla
sudo apt autoremove
sudo apt update
sudo apt install filezilla
清理配置(谨慎):
rm -rf ~/.config/filezilla
解决方法:
ls -ld /远程目录
解决方法(推荐):
sudo snap remove filezilla
sudo apt install filezilla
apt 版权限更完整
你可以把 FileZilla 的具体错误提示(完整英文)发给我,我可以精准告诉你怎么修。
例如:
Error: Authentication failed. Could not connect to server