[linux-cifs-client] cifs mounted home directory problems

Steven French sfrench at us.ibm.com
Fri Apr 1 00:45:26 GMT 2005






>Is there a workaround or fix for the ':' problem? It still seems to be a
>problem, even in linux kernel 2.6.10 /Samba 3.0.10. ...or I might very
>well have overlooked some inanely obvious setting that solves this
>

yes - I have a plan (barring objections - which are likely on such
a contentious topic) ... see below

>The problem is Evolution, KDE and other apps that use filenames
>with the colon character (':') in them.
>
>Doing a stat on one of these files tells me quite rightly that it is a
>regular file and all looks well up to that point, but if I try to cat
>one of these files I get an error message saying "Not a directory".

Wow ... interesting data I just found out.    Windows maps at least three
of the illegal characters
already (at least when SFU is installed) - and they are already mapped by
the time they are
sent over the network and stored in NTFS.   They map

                                                                            
               \ / : * ? " < > |                                            
                                                                            
                                                                            
                                                                            

to the same character prefaced by F0 - so in Unicode the 16 bit
representation of : is sent as:
      0xF0 0x3A
instead of
      0x00 0x3A

This means that the old command processor still displays them as a ? (which
is fine since
the filename can not be displayed).   So I think that this means that Samba
should be converting
at least the three
       : * ?
(those are the only three I tested) to/from the same form + 0xF000

Kind of interesting that Samba already works for:   stat (QPathInfo),
delete and rmdir but not open,
but doing the  0xF000 trick would work.

I need to add that logic into my client as well - but if it is not in Samba
then the files I create with : will
look odd when viewed from NFS.

Interestingly this seems much better than the HFS approach (to map colon to
\) at least for Linux HFS and
probably better than my xattr ideas.

Also interesting that Samba returns very odd names (and empty altnames) on
FindFirst full directory info on existing
files with such illegal names - looks like a bug in the server FindFirst
code.


Steve French
Senior Software Engineer
Linux Technology Center - IBM Austin
phone: 512-838-2294
email: sfrench at-sign us dot ibm dot com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ecblank.gif
Type: image/gif
Size: 45 bytes
Desc: not available
Url : http://lists.samba.org/archive/samba-technical/attachments/20050331/4e2915c3/ecblank.gif


More information about the samba-technical mailing list