问题描述
在日常文件传输过程中,虽然经常需要使用 FTP 客户端(虽几近废弃):
1)Filezilla 是免费的图形化界面,在日常工作中,我们使用较多;
2)ftp(1) 是命令行工具,多半用于特殊场景(比如命令行操作等等);
该笔记将记录:在 Linux 中,我们使用过的 Filezila 客户端,以及常见问题解决方案。
解决方案
Filezilla,在 GNU/Linux下的 FTP 解决方案,同时提供 FTP Client 和 FTP Server(另外的软件包)。
安装:通过仓库
apt-get install filezilla
安装:通过二进制
我们能够直接下载官方已经编译的二进制包:Download FileZilla Client for Linux (64bit x86)
安装:通过源码编译(过时)
第一步、源码下载:访问Filezilla仓库
# 检出当前版本: svn co https://svn.filezilla-project.org/svn/FileZilla3/trunk filezilla # 检出指定版本,例如检出 3.0.8-rc1 版本: svn co https://svn.filezilla-project.org/svn/FileZilla3/tags/3.0.8-rc1 filezilla-3.0.8-rc1
第二步、进行编译:先阅读 INSTALL 文件。
# 0x00,依赖: libfilezilla,https://lib.filezilla-project.org/index.php wxWidgets GnuTLS libidn (under Unix-like systems) gettext (Compiletime only) libdbus (under Unix-like systems) # 0x01,如果从SVN仓库检出,还需要以下依赖: Perl Libtool autoconf automake # 0x02,上述依赖安装完成时,执行: autoreconf -i # 0x03,编译、安装: ./configure make && make install # 0x04,运行 filezilla
安装的二进制文件
fzputtygen、fzsftp、filezilla
常见问题
中文文件名显示乱码
https://zhidao.baidu.com/question/535316734.html
问题描述:最开始我们我以为FTP Server(vsftpd)出了问题,但是我在火狐浏览器中访问:ftp://localhost,显示是正常的。所以问题应该出现在客户端。
解决方案:「文件」-「站点管理」-「选中要登陆的站点」-「字符集」-选择「强制UTF-8」。使用自定义字符集GB2312,二者之一定能解决中文显示乱码的问题。
KeepAlive(不掉线)
长时间未操作之后,已建立的FTP连接会被关闭。再次访问的时候就需要重新建立连接,比较耗时,有时建立连接也比较耗时。
通过设置可以向FTP服务发送KeepAlive命令(使用的是FTP的NOOP命令):”Edit” – “Settings” – “FTP” – “Connection” – “FTP Keep-Alive”
修改默认的本地目录
Default local path when connecting to site
在建立连接之后,默认的“本地目录”(Local site)是家目录。
能够修改默认的”本地目录”(这个设置是针对当前链接):Site Manager ⇒ 选中站点 ⇒ Advanced ⇒ Default local directory
常见问题:filezilla: error while loading shared libraries: libfilezilla.so.0: cannot open shared object file: No such file or directory
问题描述:编译安装 Filezilla 会遇到该问题,主要是因为 libfilezilla.so 没有加载
解决方案:
# ldconfig
参考文献
List of FTP commands – Wikipedia
Documentation – FileZilla Wiki
The Filezilla Website
Client Compile – FileZilla Wiki
源码目录下的 INSTALL 文件
How to Fix Timeouts in Filezilla