Disable .DS_STORE file creation on network shares

On an OSX system, .DS_STORE (Desktop Services Store), are used to store user settings for a folder, such as the list of files, the location of the icons, the selected background image.

In a mixed-OS environment using network shares, they can be annoying.

Even in a strictly Apple environment, there are security implications, as they do store data.

Besides just cluttering up your directories, the .DS_STORE file can contain potentially sensitive information.

To disable the creation of .DS_STORE files in network shared, from a terminal prompt:

defaults write com.apple.desktopservices DSDontWriteNetworkStores true

Then reboot.

References

CyberAnt -The risk of .DS_STORE https://cyberant.com/en/knowledge-base-item/the-risk-of-ds_store/

miloserdowv.org - How to open and exploit .DS_Store https://miloserdov.org/?p=3867

intelx.io - Magic File Tool https://intelx.io/tools?tab=filetool

Tech Republic - How to disable the creation of .DS_Store files for Mac users' folders https://www.techrepublic.com/article/how-to-disable-the-creation-of-dsstore-files-for-mac-users-folders/