Windows connection Samba and Vsftp Chinese garbled Solution

Source: Internet
Author: User
Tags ftp access

Windows connection Samba and Vsftp Chinese garbled solution linux is very easy to use, but others will not use it, but sharing things can still be used, but the garbled problem has been plagued, so the method has emerged! A miracle! Samba Chinese problem: in windows, we can see that the samba server contains garbled characters. In addition, we can copy the file with a Chinese file name or send it to the samba server. The file name or directory name is garbled. The solution is to modify/etc/samba/smb. in the conf file, add the following two lines: dos charset = cp936unix charset = gb2312 www.2cto.com my system is AS5.5, Samba and Vsftp services are all included in the CD version, and AS5.5 is installed. I debugged the vsftp service yesterday. I shared the ftp directory through Samba, created a Chinese directory, and copied some file names with Chinese names to the ftp directory, the results showed garbled Characters During FTP access. Later I found some articles and finally found a solution.
In the past, the default language encoding of my system is en_US.UTF-8, because windows uses GB2312 to access the samba shared directory through network neighbors, But samba uses the operating system encoding by default, this problem occurs.
1. /etc/sysconfig/i18n modify LANG environment variable LANG = "zh_CN.GB2312" SUPPORTED = "zh_HK.UTF-8: zh_HK: zh: zh_CN.UTF-8: zh_CN: zh: zh_TW.UTF-8: zh_TW: zh: en_US.UTF-8: en_US: en "SYSFONT =" latarcyrheb-sun16"
2. modify/etc/samba/smb. conf adds three lines in Global to display the character encoding, DOS character encoding, and Unix character encoding: cp936 [global] display charset = cp936dos charset = cp936unix charset = cp936
3. restart the samba service smb restart. After modification, the Chinese directory that can be viewed in Windows through network neighbor access is now garbled. You only need to change the garbled directory name or file name to Chinese again, and the newly added directory or file will not be garbled. Author: cyuyan112233

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.