Prevent *Zone.Identifier* Files From Windows On Samba Shares

If you have a Samba file server and windows client network, you’ve come across these annoying files at some point. They are added by windows and some say it is for “Security” purposes. Windows may show these files as ‘WDFGH~8’ as the files name. Since that is not the true file name on the Samba system, the files will be untouchable except by the server os. On the Samba server, the file names will appear as ‘:encryptable:$DATA’ ‘:favicon:$DATA’ or ‘:zone.identifier:$DATA’.

To prevent these files from being a problem, you need to add this line to your smb.conf somewhere in the [GLOBAL] section.

vfs objects = streams_xattr

Once added, simply restart and the problematic files will no longer be visible. If you wish to delete these files from the actual file system on the server, you will need to do that manually or problematically if you have the skill to.