Urgent!!  the issue of Characters translation fileNFS Server on Windows

Posted on 2009-04-26
Last Modified: 2012-05-06
Hi All experts

So far I have the following up & (sort of) running:

    * NFS Server for windows
    * G: drive assigned for NFS shares
    * G:\group <- group information file from a vanilla RHEL installation
    * G:\passwd <- user information file from a vanilla RHEL installation
    * G:\ascii_mappings <- a character mappings file to convert unix supported filename characters to those supproted by NTFS

Here are the problems that I am having:

The mappings file works, sort of ...
But I'm having some problems with it

    * I need to be able to make files with the following characters within the filenames:


      But when I put the map in the '-' character is being interpretted as a ':' which will make some files useless.

I need help working out the character mappings file so that we preserve the naming of all of the files we copy to NFS or our current backup strategy with Backup server as an NFS server won't really work unless we redesign the backup process

Thanks for your help!
Question by:mxgong
    LVL 7

    Expert Comment

    There are a couple more to lookout for. These are illegal in Windows, so it wont allow them to be written to the filesystem:

    \ / : * ? " < > |

    Pick another character that you are not using in any file to map the characters with. Maybe some of the extended ascii characters, as provider here:

    I assume you already came accross this article:;en-us;289627&

    Author Comment

    Thanks for your reply.

    I actually do follow the steps in the But When I "touch" a file in the linux I can see right filename in the windows, but the filename in linux side also is changed.

    for example:

    [linux Server] touch abc?abc
    [linux Server] ls
    abc-abc     <-- I think this should be abc?abc, right?

    in widows NFS share folder: abc-abc    <--this is right filename

    Please advice.

    0x00 0x5c : 0x00 0x2d
    0x00 0x3f : 0x00 0x2d

    Open in new window

    LVL 7

    Accepted Solution

    You're mapping both 5c (\) and 3f (?) to 2d (-). This means that windows will save both aaa\bbb and aaa?bbb as aaa-bbb. How will it know which is which when it has to convert it back again?

    From the Microsoft link I posted above:

    A given character must be mapped only to one character; that is, mapping a character to two or more different characters must be avoided.

    So my guess is that if you change it so something like:

    0x00 0x5c : 0x00 0x2d
    0x00 0x3f : 0x00 0x7e

    you would be okay. 7e is a tilde ~

    with the emphasis on: my GUESS is :) As I'm not sure if that is the problem. Try it and see if it works. If it does, you'll have to use different characters for each of the windows special characters. Try the graphic characters in the second table at

    LVL 11

    Assisted Solution

    You might need to set the character encoding on the NFS mount with something like this in /etc/fstab:
    (You will need to modify this to your system and usage) [note the area about iocharset=]
    //        /media/directory    cifs guest,rw,iocharset=iso8859-7,file_mode=0777,dir_mode=0777 0 0

    If you have problems, please post us the /etc/fstab here.


    NFS version 2 and 3 are currently limited in the character encoding
      of strings. In the NFS protocols, strings are used for file and
      directory names, and symbolic link contents. Although the XDR
      definition [RFC1832] limits strings in the NFS protocol to 7-bit US-
      ASCII, common usage is to encode filenames in 8-bit ISO-Latin-1.
      However, there is no mechanism available to tag XDR character strings
      to indicate the character encoding used by the client or server.
      Obviously this limits NFS' usefulness in an environment with clients
      that may operate with various character sets.
    LVL 11

    Expert Comment

    By the way, you posted for a Windows server in the Linux zone.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    Attention: This article will no longer be maintained. If you have any questions, please feel free to mail me. Please see for the updated article. It is avail…
    A quick step-by-step overview of installing and configuring Carbonite Server Backup.
    Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
    This tutorial goes over how to archive and restore FreeBSD jails that are managed by ezjail.

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    14 Experts available now in Live!

    Get 1:1 Help Now