免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 6927 | 回复: 9
打印 上一主题 下一主题

[FreeBSD] /var/log/vsftpd.log日志和FreeBSD下中文文件名问题 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2008-02-24 11:50 |只看该作者 |倒序浏览
FreeBSD 6.3 Release
默认安装

Windows下通过ftp上传到FreeBSD的中文文件名显示都是????号
ftp daemon用的是 vsftpd 2.0.5

/var/log/vsftpd.log
里面的记录显示的也是???号

即使把vsftpd.log日志文件放到windows下看也是???问号。
---------------------

两个问题:
1、请问该怎么设置才能在windows putty 客户端正常显示FreeBSD系统里面的中文文件名?
2、以上设置成功后,vsftpd.log日志文件也能正常记录中文文件名了吧,否则应该如何设置?

-------------
btw,我用过OpenBSD 4.2
默认安装下,Windows putty 客户端能正常显示OpenBSD系统目录下的中文文件名,
vsftpd.log也正常。

FreeBSD的FAQ看完了,handbook还没有看,想快点知道答案。谢谢。

论坛徽章:
2
丑牛
日期:2013-09-29 09:47:222015七夕节徽章
日期:2015-08-21 11:06:17
2 [报告]
发表于 2008-02-24 18:48 |只看该作者
这个还真没注意,默认应该能显示的吧,你看看ftp.bsdlover.cn,我刚放了个中文名的文件

论坛徽章:
0
3 [报告]
发表于 2008-02-26 10:36 |只看该作者

回复 #2 剑心通明 的帖子

Windows 下用putty  连接到我自己的FreeBSD服务器
假设vsftpd设置的匿名目录是/home/ftp/
然后ftp localhost,能正常显示ftp里面的中文文件名字
ftp你的服务器也可以

问题是
putty下ls /home/ftp/看到的中文文件名都是???问号
putty下ftp localhost 之后ls能看到中文文件名

希望我已经清楚得描述了问题
对了,补充说明,我的FreeBSD是只安装了 bin和doc

[ 本帖最后由 f5b 于 2008-2-26 10:37 编辑 ]

论坛徽章:
54
2017金鸡报晓
日期:2017-02-08 10:39:42操作系统版块每日发帖之星
日期:2016-03-08 06:20:00操作系统版块每日发帖之星
日期:2016-03-07 06:20:00操作系统版块每日发帖之星
日期:2016-02-22 06:20:00操作系统版块每日发帖之星
日期:2016-01-29 06:20:00操作系统版块每日发帖之星
日期:2016-01-27 06:20:00操作系统版块每日发帖之星
日期:2016-01-20 06:20:00操作系统版块每日发帖之星
日期:2016-01-06 06:20:0015-16赛季CBA联赛之江苏
日期:2015-12-21 20:00:24操作系统版块每日发帖之星
日期:2015-12-21 06:20:00IT运维版块每日发帖之星
日期:2015-11-17 06:20:002015亚冠之广州恒大
日期:2015-11-12 10:58:02
4 [报告]
发表于 2008-02-26 11:29 |只看该作者
ls -w试了吗?

论坛徽章:
2
丑牛
日期:2013-09-29 09:47:222015七夕节徽章
日期:2015-08-21 11:06:17
5 [报告]
发表于 2008-02-26 11:37 |只看该作者
那是我没看清楚你的问题了,楼上说的ls -w,你试试,应该可以的

论坛徽章:
0
6 [报告]
发表于 2008-02-26 11:37 |只看该作者

回复 #4 lsstarboy 的帖子

谢谢 ls -w能正常显示中文了.

但是vsftpd.log日志里面的中文文件名还是??问号怎办?
这个文件下载到windows系统里面看也如是.

vsftpd.conf
跟日志有关的只有
xferlog_enable=YES

其他默认

[ 本帖最后由 f5b 于 2008-2-26 11:39 编辑 ]

论坛徽章:
0
7 [报告]
发表于 2008-03-03 15:16 |只看该作者
补充说明

FreeBSD 7.0 Release  最小化user安装  bin and doc only
vsftpd 2.0.6
下面

/var/log/vsftpd.log
日志里面的中文文件名还是???表示,请关注,谢谢。

[ 本帖最后由 f5b 于 2008-3-3 15:17 编辑 ]

论坛徽章:
54
2017金鸡报晓
日期:2017-02-08 10:39:42操作系统版块每日发帖之星
日期:2016-03-08 06:20:00操作系统版块每日发帖之星
日期:2016-03-07 06:20:00操作系统版块每日发帖之星
日期:2016-02-22 06:20:00操作系统版块每日发帖之星
日期:2016-01-29 06:20:00操作系统版块每日发帖之星
日期:2016-01-27 06:20:00操作系统版块每日发帖之星
日期:2016-01-20 06:20:00操作系统版块每日发帖之星
日期:2016-01-06 06:20:0015-16赛季CBA联赛之江苏
日期:2015-12-21 20:00:24操作系统版块每日发帖之星
日期:2015-12-21 06:20:00IT运维版块每日发帖之星
日期:2015-11-17 06:20:002015亚冠之广州恒大
日期:2015-11-12 10:58:02
8 [报告]
发表于 2008-03-03 18:31 |只看该作者
我的vsftp也是这样,还没找到解决办法。

除了修改vsftp的源代码,把日志函数中的一个把非打印字符替换成问号的函数去掉。忘了具体的名字,但是百度可以搜索到。

论坛徽章:
0
9 [报告]
发表于 2008-03-03 18:48 |只看该作者
你可否把语言的环境变量改为中文环境变量试一下

论坛徽章:
0
10 [报告]
发表于 2008-03-04 09:51 |只看该作者

继续补充另外的发现

FreeBSD 7.0 Release下面  安装 7.0 stable版本的packages vsftpd 2.0.6
/etc/rc.conf只有以下参数
defaultrouter=XXX
hostname=XXX
ifconfig_em0=XXX
ifconfig_vr0=XXX
inetd_enable="NO"
sshd_enable="YES"
XXX这里表示不公开

结果是
cuteftp客户端上传的中文名文件,在cuteftp客户端中显示正常,但用ie上来浏览出现的是???符号。反过来,在IE中上传的中文名文件,在cuteftp客户端中显示完全乱码。

如果FreeBSD 7.0 Release 安装  Release版本的package vsftpd 2.0.5
则没有上述问题,vsftpd.log日志中的中文被?问号替换问题依旧。

---------顺便贴vsftpd 2.0.6的官方changelog给大家看看
===============================

- Fix delay_failed_login typo. Oops.
- Patch the getcwd and readlink sysutil helpers to reflect that they wouldn't
like a 0-sized buf. No caller is affected. Thanks Ilja van Sprundel
<ilja@suresec.org>.
- Allow a (fake) reauth as the same user as the logged in user. Should resolve
.NET related report from Sabo Jim <Jim.Sabo@thomson.net>.
- Tweak from Lucian Adrian Grijincu <lucian.grijincu@gmail.com> to take
unnecessary port calculations out of a loop.
- Fix byte I/O accounting in the error path of do_file_send_rwloop, thanks to
<echen@siac.com>.
- Don't log FireFox's attempts to RETR directories! Reported by
Nixdorf, Tim <tnixdorf@dnps.com>.
- Fix STOU sending the same 150 status line twice - oops! Reported by
<yamazaki@iij.ad.jp>.
- Fix xferlog format for virtual (guest) users, reported by Andy Fletcher
<andy@withnail.org>.
- Fix bug with empty user list file and userlist_deny=NO. Reported by
Marcin Zawadzki/GlobalVanet.com <marcin.zawadzki@globalvanet.com>.
- Pretend we have proper UTF8 support and respond positively to OPTS UTF8 ON.
Thanks Stanislav Maslovski <stanislav.maslovski@gmail.com>.
- Add control over the file permissions used in the chown()ing of anonymous
uploads: chown_upload_mode (default 0600 as before). Suggestion from
An Pham <apham@medforcetech.com>.
- Do a retry getting the active ftp socket in vsf_privop_get_ftp_port_sock();
should help buggy Solaris systems. Reported by Michael Masterson
<mjmasterson@xo.com>.
- Add debug_ssl option to dump out some SSL connection details.
- Use code 522, not 521, to indicate that the server requires an encrypted
data connection. Still does not seem to coax lftp to retry
- Recognize OPTS pre-login.
- A whole ton of SSL improvements, including ability to force requirement of
a client cert; data and control channel client cert cross checking. Ability
to require fully valid / authentic client certs. No cert-based auth yet.
- Change my e-mail to my GMail account.

At this point: v2.0.6 released!
===============================
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP