tlaronde at kergis.com
2024-Feb-01 12:30 UTC
[Samba] Windows text file encoding vs Unix Samba server
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
Rowland Penny
2024-Feb-01 13:00 UTC
[Samba] Windows text file encoding vs Unix Samba server
On Thu, 1 Feb 2024 13:30:56 +0100 Thierry LARONDE via samba <samba at lists.samba.org> wrote:> 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!I don't think you have given us enough information here to even guess at an answer. What Windows versions are you using ? How are you running Samba ? Is there an AD domain involved ? What 'program' or 'programs' are involved ? Could it be a 'locking' problem ? What is in your smb.conf ? There have been a lot of changes since 3.6.x Rowland