安装FileZilla客户端
sudo apt update && sudo apt install filezilla
验证安装:dpkg -l | grep filezilla
。
安装FileZilla服务器(如需搭建服务端)
wget https://dl3.cdn.filezilla-project.org/server/FileZilla_Server_*.deb
sudo dpkg -i FileZilla_Server_*.deb
sudo systemctl start filezilla-server
sudo systemctl enable filezilla-server
配置文件路径:/etc/filezilla/filezilla.xml
,可设置监听端口、用户权限等。
客户端连接参数
防火墙配置
ufw
,需开放FTP/SFTP端口及被动模式端口:sudo ufw allow 21/tcp # FTP
sudo ufw allow 22/tcp # SFTP
sudo ufw allow 50000:50100/tcp # 被动模式(示例范围)
sudo ufw reload
```。
服务端配置验证
sudo systemctl status vsftpd
(若使用vsftpd)或filezilla-server
。Listen=YES
,并正确设置PassivePorts
(被动模式需指定端口范围)。sudo chown -R ftpuser:ftpuser /home/ftpuser
。/var/log/syslog
或FileZilla日志查看连接错误详情。参考来源: