Hi, I have some weird issue I don't know how to tackle. When I share a folder from a Unix (Linux) machine using a current version of Samba (smbd) and I mount it on an older Synology (2.6.32) the reading of files goes fine. However all files I create get the chacacters #EF80AF affixed to the filename, which is a Unicode code point for private extensions, or something of the kind. Perhaps it also means "left-to-right", I don't know. The CIFS kernel module might very well be modified by Synology, I don't know. Although modinfo just produces the following (without parms): filename: /nas/home/cifs.ko version: 1.61 description: VFS to access servers complying with the SNIA CIFS Specification e.g. Samba and Windows license: GPL author: Steve French <sfrench at us.ibm.com> srcversion: BAD2BA742996F91AC9BA4E4 depends: vermagic: 2.6.32.12 mod_unload ARMv5 From another current Linux machine (same kind, I guess) operation is flawless, no problem whatsoever from what I can see. Actually that #EF80AF is getting prefixed, not affixed, in that sense that a filename may become (on the server): 00000000 ef 80 af 77 65 69 72 64 0a |...weird.| 00000009 (where the newline is just added by ls). So #ef80af is utf-8. There is no other log output on the part of the server. Unix extensions are in affect but in fact even .... I'm sorry, reading stuff also doesn't work. A regular file requested that was written by another host (and has normal characters in the name) results in "File not found" when trying to e.g. cat. "No such file or directory." Do I need to compile a new kernel module? I guess I'll start doing that but it has to come from the 2.6.32 tree so it will be that same older module probably. So I just absolutely don't know what is going on. If you can help, please.!.
I wrote here how my filenames are getting mangled when getting sent or received to the server. Server: current Ubuntu lookalike. Client: Older Synology diskstation with probably a modified mount.cifs. When I send utf-8 it gets received as dos. "é" for instance is #c3a9 in utf-8, and it is used by the server as #c3, #a9, two separate bytes, becoming é. The server is just configured with defaults for "dos" and "unix" clients. The client tries to use iocharset=utf8. What can I do to enforce utf8 being recognised by the server? It apparently thinks it is talking to a dos client. But unix extensions are being negotiated because the client sees the permissions and ownership of the separate files. Anyone know what to do? Do I need a different mount.cifs? Regards.
Jeremy Allison
2016-Jul-11 22:58 UTC
[Samba] server not using utf8-mode with Synology client
On Mon, Jul 11, 2016 at 11:41:24PM +0200, Xen wrote:> I wrote here how my filenames are getting mangled when getting sent > or received to the server. > > Server: current Ubuntu lookalike. > > Client: Older Synology diskstation with probably a modified mount.cifs. > > When I send utf-8 it gets received as dos. > > "é" for instance is #c3a9 in utf-8, and it is used by the server as > #c3, #a9, two separate bytes, becoming é. > > The server is just configured with defaults for "dos" and "unix" > clients. > > The client tries to use iocharset=utf8. > > What can I do to enforce utf8 being recognised by the server?Set the parameter: unix charset = utf8 in the [global] section of the synology smb.conf.