| Samba, UTF-8 and UNIX extensions |
[Jul. 9th, 2008|11:46 am] |
So, many people know that rather than using RAID on my fileserver (primarily because speed is of little importance, and data I care about is replicated), I just have a /mnt/media directory with 10 mounted drives in it. I then have a nightly "union" script which creates a softlink-based directory structure for all items in these discs, assuming each has a common structure and no overlaps.
I then share this as a read-only share "media". This causes one important issue with Samba - it defaults to enabling "UNIX extensions", which share softlinks as-is, hence enabling me to access no files. Therefore, I have to turn them off.
Of course, in doing so Samba was bound to break. In this case, I found that it was unable to share files with UTF-8 in their filename on cifs mounts correctly (they would give "file not found" even though they were listed or just not list at all). More annoyingly, smbclient would be able to access the files fine.
The solution I finally found was to set under global in smb.conf:
dos charset = UTF-8
And for the client, pass the iocharset=utf8 to the cifs mount command. All now seems happy. |
|
|