Managing .DS_Store and .AppleDouble Files On a SAMBA Share

If you use a Mac and create SAMBA shares on linux hosts, you’re bound to find lots of .DS_Store files. They are, in and of themselves, harmless; they just store custom window information for the MacOS Finder. But if you prefer to have that information not saved rather than finding those files, you can prevent them in several ways.

From the MacOS client, you can tell it not to create .DS_Store files with the command:

defaults write com.apple.desktopservices DSDontWriteNetworkStores true

Also, you can create /etc/nsmb.conf (or ~/Library/Preferences/nsmb.conf) and add:

[default]
streams=yes

The down side to the client side methods is that you have to configure it on every Mac you connect with before you connect, or you’ll end up with the files.

Another option is on the linux server, you can add the following to the shares to prevent and remove them:

veto files = /._*/.DS_Store/
delete veto files = yes

Leave a Comment