Bug 257 - supported filename length smaller than Win* servers
Summary: supported filename length smaller than Win* servers
Status: RESOLVED LATER
Alias: None
Product: Samba 3.0
Classification: Unclassified
Component: File Services (show other bugs)
Version: 3.0.0preX
Hardware: All All
: P2 normal
Target Milestone: none
Assignee: Samba Bugzilla Account
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-07-28 11:01 UTC by Björn Jacke
Modified: 2005-02-07 08:41 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Björn Jacke 2003-07-28 11:01:35 UTC
POSIX filesystems usually support 255 bytes in filenames.
That means 255 ascii characters or ~85 Japanese/Chinese characters encoded
in UTF-8. Chinese characters take usually 3 bytes, sometimes even 4 bytes.

Win* servers (NTFS) support 255 UTF-16 characters, i.e. 2*255 bytes, which
means 255 ascii characters or 255 Japanese/Chinese characters.

That means Samba effectively supports filenames which are signifficantly
smaller than Win NT servers.

Did anyone think about how to solve this problem? Some other languages
(Greek...) who also have lots of multybyte characters are also affected by
that limitation.

Maybe one could save just a short version of such long files and save the
full version somewhere else? Somewhere else might be extended attributes
or better an external database. Both not very nice but any other, better
suggestions?
Comment 1 Jelmer Vernooij 2004-01-06 12:25:13 UTC
A database similar to the one for the 8.3 filenames might help here.
Comment 2 Gerald (Jerry) Carter (dead mail address) 2004-03-17 05:51:27 UTC
we can't really fix this in 3.0 dur to the proliferation of 
static char[]'s.  Marking as 'Later"
Comment 3 Björn Jacke 2004-08-24 08:57:01 UTC
is this already in cosideration for samba4 now?
Comment 4 Dan Singletary 2004-11-30 21:16:03 UTC
This bug also manifests itself when using smbclient to mount a WinXP share on a
linux system, when using the "unicode,codepage=unicode" options.  Any filename
on WinXP that is longer than 128 characters will be abruptly truncated when it
is represented on the linux system.  When programs on the linux system try to
access the file by it's truncated name, the file system says the file does not
exist.  I found this problem when using rsync to backup shares from a WinXP
system to a linux system.  I assume that this bug exists because smbclient is
only allocating 256 bytes for the filename, and when multibyte encoding is used
(ie: unicode), you only can encode 128 unicode characters in 256 bytes....  This
effectively means that when using unicode with smbclient, the maximum length of
a filename on a WinXP share that you can access is 127 characters.
Comment 5 Gerald (Jerry) Carter (dead mail address) 2005-02-05 07:48:06 UTC
I doubt this will get fixed in Samba 3.  Wait until Samba 4
has its own category in bugzilla.
Comment 6 Gerald (Jerry) Carter (dead mail address) 2005-02-07 08:41:31 UTC
originally reported against 3.0.0beta3.  CLeaning out 
non-production release versions.