I have files on SMB User Shares that have "illegal characters" from a Windows perspective. I mainly use Linux, so this generally isn't a problem for me. What I would like to do is enable catia, which allows for character remapping when files are served, for each of the shares with the offending "illegal characters". In trying to do this, I added the following lines to my SMB Extras:
[global]
#Mapping illegal characters, where enabled with "vfs objects = catia"
mangled names = no
vfs objects = catia
catia:mappings = 0x22:0xa8,0x2a:0xa4,0x2f:0xf8,0x3a:0xf7,0x3c:0xab,0x3e:0xbb,0x3f:0xbf,0x5c:0xff,0x7c:0xa6
This works for the "rootshare" that I created in my SMB Extras, which does not override the vfs objects setting, and the filenames are properly remapped. However, all of my User Shares still don't properly remap. In debugging this, I went and looked at /etc/samba/smb.conf which includes smb-extra.conf and then smb-shares.conf. Looking into smb-shares.conf (while my array was started), reveals that each share has the following lines (which will override the global setting)
[sharename]
vfs objects = extd_audit recycle
I editted the line in each of the offending shares to include catia, then ran
samba restart
, and the character remapping was working as expected. The issue with this is that the smb-shares.conf file is generated at array startup, as the file is empty when the array is stopped. It does not appear that there is a way to add this in /boot/config/shares/sharename.cfg. I cannot find out what is generating the smb-shares.conf, so I do not know how to get the catia option added.
Ultimately, I would like to know how to edit the config which generates the smb-shares.conf so that I can include the "catia" value into the vfs objects value. This way I won't have to remember to make the change and then restart samba just for this change to be included. Thanks for the help.