URN Logo
UNIX Resources » Linux » China Linux Forum » Linux 安装与入门 » 1 » ubuntu下的proftpd字符编码解决
announcement 声明: 本页内容为中国Linux论坛的内容镜像,文章的版权以及其他所有的相关权利属于中国Linux论坛和相应文章的作者,如果转载,请注明文章来源及相关版权信息。
Resources
China Linux Forum(finished)
Linux Forum(finished)
FreeBSD China(finished)
linuxforum.net
  业界新闻与评论
  自由软件杂谈
  IT 人生
  Linux软件快递
  翻译作坊
  Linux图书与评论
  GNU Emacs/XEmacs
  Linux 中文环境和中文化
  Linux桌面与办公软件
  Linux 多媒体与娱乐版
  自由之窗Mozilla
  笔记本电脑上的Linux
  Gentoo
  Debian 一族
  网络管理技术
  Linux 安装与入门
  WEB服务器和FTP服务器
  域名服务器和邮件服务器
  Linux防火墙和代理服务器应用
  文件及打印服务器
  技术培训与认证
  Linux内核技术
  Linux 嵌入技术
  Linux设备驱动程序
  Linux 集群技术
  LINUX平台数据库
  系统和网络安全
  CPU 与 编译器
  系统计算研究所专栏
  Linux下的GUI软件开发
  C/C++编程版
  PHP 技 术
  Java&jsp技术
  Shell编程技术
  Perl 编 程
  Python 编 程
  XML/Web Service 技术
  永远的Unix
  FreeBSD世界
   
ubuntu下的proftpd字符编码解决
Author: skyone    Posted: 2008-06-29 15:51    Length: 2,761 byte(s)
[Original] [Print] [Top]


ubuntu安装了proftpd ,因为ubuntu默认服务器编码是utf-8 ,而所有windows的ftp客户端都默认使用gbk或是gb2312编码,所以导致服务器上正常的中文文件名,在客户端上看起来都是乱码;而用户通过这些客户端在服务器上建立的看起来正常的中文文件名,在服务器上看起来又是乱码了。
google了一下,未果, 基本都是要求windows客户端换成某种可强行utf8的ftp软件,不现实且不灵活。看到有一个rc版,里面的news提到了一个UseEncoding参数,提及到了相关这方面的问题,于是下载测试,完全OK。
下载:
Candidate: 1.3.2rc1
[ RELEASE_NOTES ]
[ NEWS ] [ gz ] [ bz2 ]

安装:
sudo mv proftpd-1.3.2rc1.tar.gz /usr/local
cd /usr/local
sudo tar zxvf xxxx.tar.gz
cd proftp-1.3.2rc1
sudo ./configure --prefix=/usr/local/proftpd --enable-autoshadow --enable-auth-pam -enable-dso --enable-nls --enable-shadow --disable-ipv6
sudo make
sudo make install

配置:
sudo vi /usr/local/proftpd/etc/proftpd.conf

在 以下你需要配置的区间"server config", , 里面加上UseEncoding UTF-8 GBK
保存,退出,重启动proftpd ,测试 ,搞定

官方文档:
UseEncoding

Syntax: UseEncoding on|off|local-charset client-charset
Default: None
Context: "server config", ,
Module: mod_lang
Compatibility: 1.3.2rc1

The UseEncoding directive is used to explicit configure which character
sets should be used for encoding. By default, the mod_lang will
automatically discover the local character set, and will use UTF8 for
the client character set. The module will also allow the use of UTF8
encoding to be changed by clients using the OPTS UTF8 command (as per
RFC2640). However, if the UseEncoding directive is explicitly used to
indicate the character sets to use (or not use), then any OPTS UTF8
commands used by clients will be refused.

For example, to disable all use of encoding, use the following in your
proftpd.conf:
UseEncoding off

Similarly, to enable use of UTF8 encoding and to not allow clients to
change the use of UTF8, you would use:
UseEncoding on

In addition to the on|off parameters, the UseEncoding directive allows
administrators to specify exactly which character sets to use locally
(i.e. for paths on local disks) and for dealing with clients. One such
usage this way might look like:
UseEncoding koi8-r cp1251

For a full list of the character sets which are supported, use:
$ iconv --list
----
轻舞飞扬?:)!那是我的手指!
[Original] [Print] [Top]
No previous thread Linux 安装与入门
1
Next thread »
有关Debian和FVWM的一些问题
     

Copyright © 2007 UNIX Resources Network, All Rights Reserved.      About URN | Privacy & Legal | Help | Contact us
备案序号: 京ICP备05006143    webmaster: webmaster@unixresources.net
This page created on 2008-07-17 02:16:58, cost 0.066277027130127 ms.