AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / computer / 问题 / 1482559
Accepted
Chameleon
Chameleon
Asked: 2019-09-15 03:06:02 +0800 CST2019-09-15 03:06:02 +0800 CST 2019-09-15 03:06:02 +0800 CST

流行的 FTP 客户端无法自动检测到 VSFTPD 提供 UTF-8 文件名

  • 772

我运行 vsftpd 3.0.3 / armv7l / Debian 9.11 / Kernel 4.14.133+

有些路径有希腊字符。

在文件/etc/vsftpd.conf中有一行utf8_filesystem=YES,但也是默认行为。

在客户端的字符集自动检测模式下:

Chrome、Opera、Total Commander 理解使用 UTF-8 字符的路径。

Firefox、FileZilla、Double Commander 不理解使用 UTF-8 字符提供的路径,并且每个希腊字符显示 2 个字符。如果我将字符集强制为 UTF-8,一切正常。

我不确定这种错误行为是客户端的。我相信(!)没有错误的客户,只是在字符集上有一个故障安全机制。

这是一个小问题,但我以外的客户用户可能会感到沮丧。

波纹管是 Filezilla 日志,连接:

Status: Connecting to 192.168.1.2:21...
Status: Connecting to 192.168.1.2:21...
Status: Connection established, waiting for welcome message...
Response: 220 (vsFTPd 3.0.3)
Command: AUTH TLS
Response: 530 Please login with USER and PASS.
Command: AUTH SSL
Response: 530 Please login with USER and PASS.
Status: Insecure server, it does not support FTP over TLS.
Command: USER videos
Response: 331 Please specify the password.
Command: PASS 
Response: 230 Login successful.
Command: SYST
Response: 215 UNIX Type: L8
Command: FEAT
Response: 211-Features:
Response:  EPRT
Response:  EPSV
Response:  MDTM
Response:  PASV
Response:  REST STREAM
Response:  SIZE
Response:  TVFS
Response: 211 End
Status: Server does not support non-ASCII characters.
Status: Logged in
Status: Retrieving directory listing...
Command: PWD
Response: 257 "/" is the current directory
Command: TYPE I
Response: 200 Switching to Binary mode.
Command: PASV
Response: 227 Entering Passive Mode (192,168,1,2,204,166).
Command: LIST
Response: 150 Here comes the directory listing.
Response: 226 Directory send OK.
Command: PASV
Response: 227 Entering Passive Mode (192,168,1,2,73,251).
Command: LIST -a
Response: 150 Here comes the directory listing.
Response: 226 Directory send OK.
Status: Directory listing of "/" successful

还有一个图像,文件路径如何显示:

在此处输入图像描述

utf-8 ftp
  • 1 1 个回答
  • 2284 Views

1 个回答

  • Voted
  1. Best Answer
    Martin Prikryl
    2019-09-15T22:22:09+08:002019-09-15T22:22:09+08:00

    FileZilla 需要服务器UTF8在响应中返回FEAT自动使用 UTF-8 的命令。

    您的服务器不返回UTF8。但奇怪的是 vsftpd 3.0.3 应该UTF8无条件返回。这是用于发送FEAT命令响应的 vsftpd 3.0.3 代码:

    void
    handle_feat(struct vsf_session* p_sess)
    {
      vsf_cmdio_write_hyphen(p_sess, FTP_FEAT, "Features:");
      if (tunable_ssl_enable)
      {
        if (tunable_sslv2 || tunable_sslv3)
        {
          vsf_cmdio_write_raw(p_sess, " AUTH SSL\r\n");
        }
        if (tunable_tlsv1)
        {
          vsf_cmdio_write_raw(p_sess, " AUTH TLS\r\n");
        }
      }
      if (tunable_port_enable)
      {
        vsf_cmdio_write_raw(p_sess, " EPRT\r\n");
      }
      if (tunable_pasv_enable)
      {
        vsf_cmdio_write_raw(p_sess, " EPSV\r\n");
      }
      vsf_cmdio_write_raw(p_sess, " MDTM\r\n");
      if (tunable_pasv_enable)
      {
        vsf_cmdio_write_raw(p_sess, " PASV\r\n");
      }
      if (tunable_ssl_enable)
      {
        vsf_cmdio_write_raw(p_sess, " PBSZ\r\n");
        vsf_cmdio_write_raw(p_sess, " PROT\r\n");
      }
      vsf_cmdio_write_raw(p_sess, " REST STREAM\r\n");
      vsf_cmdio_write_raw(p_sess, " SIZE\r\n");
      vsf_cmdio_write_raw(p_sess, " TVFS\r\n");
      vsf_cmdio_write_raw(p_sess, " UTF8\r\n");
      vsf_cmdio_write(p_sess, FTP_FEAT, "End");
    }
    

    这与您发布的日志不匹配。您必须有一些自定义版本的 vsftpd,或者在剥离UTF8.


    无论如何,您可以将 FileZilla 配置为始终使用 UTF-8。在站点管理器上,转到字符集选项卡并选择强制 UTF-8。

    • 2

相关问题

  • 如何从 WinSCP 导出文件中获取未加密的 FTP 登录密码?

  • 从 FileZilla 上传文件时实际发生了什么?我们在主持吗?,如果是,它实际上是如何与网络托管服务提供商联系起来的?

  • 使用 Microsoft Word 保存不带 BOM 的 UTF-8 文件

  • 是否可以使用文本创建二维码?

  • 是否可以在客户端中使用没有文件系统的 FTP?

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    Windows 照片查看器因为内存不足而无法运行?

    • 5 个回答
  • Marko Smith

    支持结束后如何激活 WindowsXP?

    • 6 个回答
  • Marko Smith

    远程桌面间歇性冻结

    • 7 个回答
  • Marko Smith

    Windows 10 服务称为 AarSvc_70f961。它是什么,我该如何禁用它?

    • 2 个回答
  • Marko Smith

    子网掩码 /32 是什么意思?

    • 6 个回答
  • Marko Smith

    鼠标指针在 Windows 中按下的箭头键上移动?

    • 1 个回答
  • Marko Smith

    VirtualBox 无法以 VERR_NEM_VM_CREATE_FAILED 启动

    • 8 个回答
  • Marko Smith

    应用程序不会出现在 MacBook 的摄像头和麦克风隐私设置中

    • 5 个回答
  • Marko Smith

    ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] 证书验证失败:无法获取本地颁发者证书 (_ssl.c:1056)

    • 4 个回答
  • Marko Smith

    我如何知道 Windows 安装在哪个驱动器上?

    • 6 个回答
  • Martin Hope
    Albin 支持结束后如何激活 WindowsXP? 2019-11-18 03:50:17 +0800 CST
  • Martin Hope
    fixer1234 “HTTPS Everywhere”仍然相关吗? 2019-10-27 18:06:25 +0800 CST
  • Martin Hope
    Kagaratsch Windows 10 删除大量小文件的速度非常慢。有什么办法可以加快速度吗? 2019-09-23 06:05:43 +0800 CST
  • Martin Hope
    andre_ss6 远程桌面间歇性冻结 2019-09-11 12:56:40 +0800 CST
  • Martin Hope
    Riley Carney 为什么在 URL 后面加一个点会删除登录信息? 2019-08-06 10:59:24 +0800 CST
  • Martin Hope
    zdimension 鼠标指针在 Windows 中按下的箭头键上移动? 2019-08-04 06:39:57 +0800 CST
  • Martin Hope
    Inter Sys Ctrl+C 和 Ctrl+V 是如何工作的? 2019-05-15 02:51:21 +0800 CST
  • Martin Hope
    jonsca 我所有的 Firefox 附加组件突然被禁用了,我该如何重新启用它们? 2019-05-04 17:58:52 +0800 CST
  • Martin Hope
    MCK 是否可以使用文本创建二维码? 2019-04-02 06:32:14 +0800 CST
  • Martin Hope
    SoniEx2 更改 git init 默认分支名称 2019-04-01 06:16:56 +0800 CST

热门标签

windows-10 linux windows microsoft-excel networking ubuntu worksheet-function bash command-line hard-drive

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve