[Samba] Windows text file encoding vs Unix Samba server

tlaronde at kergis.com tlaronde at kergis.com
Thu Feb 1 12:30:56 UTC 2024


Hello,

I have a NetBSD (currently kernel 9.2 without kernel ACL support)
server serving files via Samba to, mainly, a heterogeneous network of
MS Windows nodes with various versions, but the (new) problem I face
does not depend on the MS version or the cifs protocol version.

It used to work with Samba 3.6.* but it doesn't with 4.18.9 (the Samba
version installed).

Even when the Windows' user has full control other a (Unix) file, in
some cases: apparently always text or considered as text files, some
programs can't modify the file that the user totally controls and we
have to save under another pathname, before removing the old file and
putting the new version in its stead.

I thought, at the beginning, that there had something to do with the
names of temporary files (unable to create the temporary or to rename
the temporary). But there is no problem with the temporary names (they
are created).

There is no problem when a program handles a binary file (the program
can modify the file).

So I begin to suspect that this has something to do with localisation:
that the Unix file is declared, by default, to have a certain encoding
for a certain lang or that, in fact, nothing is declared related to
encoding or lang, so that the Windows client considers it can not deal
with a text file whose lang and encoding is unknown or for a
combination it does not support.

Is there something l10n/i18n related indeed in the CIFS protocol?

TIA for any tip or any link to documentation that may shed some light
on the subject!
-- 
        Thierry Laronde <tlaronde +AT+ kergis +dot+ com>
                     http://www.kergis.com/
                    http://kertex.kergis.com/
Key fingerprint = 0FF7 E906 FBAF FE95 FD89  250D 52B1 AE95 6006 F40C



More information about the samba mailing list