This article is an excerpt from an old personal security blog used to run at this address.
Since Tenable linked to this page in their flagship product Nessus the article, dated 2007-11-12 09:39:23, is still here for historical purposes.
For more up-to-date information or corporate advice on cyber security please visit: https://cynix.ch



Prevent creation of .DS_Store files in network shares

If you run your Mac in a mixed network environment you'll surely have noticed .DS_Store files appearing in the shared folders of your Linux or Windows boxes, they're hidden files used to store custom attributes of a folder such as the position of icons or the choice of a background image. By default, MacOS X will create a .DS_Store file in every folder it accesses, while this is ok in OS X it may be annoying for network shares.
To prevent the creation of .DS_Store files on network volumes execute this from a Terminal:

defaults write com.apple.desktopservices DSDontWriteNetworkStores true

In addition, to easily get rid of all already existing .DS_Store execute from a Terminal:

sudo find / -name '.DS_Store' -print -delete

Note: Since MacOS X 10.5 (Leopard) .DS_Store files are set invisible for the Windows filesystem so if you don't show hidden files and don't run any other OSes you may not need this.