:::: MENU ::::

Mac .ds_store Files on File Servers

If you have a hybrid environment of Mac and Windows File servers you probably have seen several file types that the Macs leave around the file server.  Most of the time you will see .ds_store files appearing where ever a Mac has browsed the file server.  These meta data files are used by the macs telling the finder how to display, where to appear on the screen, what view to use etc.. but becomes problematic when you have a few users with different resolutions or systems with and without dual monitor are browsing the same file server.  Some backup solutions and DFS Replication can have issues with these files as well.

Apple documents the ability to turn off the .ds_store files here: http://support.apple.com/kb/ht1629 but isn’t totally complete in the instructions so I have documented the process here.

1.  Open Terminal.
2. Change Directory 
    cd ~/library/preferences
3. Write the plist file with the following command: 
    defaults write com.apple.desktopservices DSDontWriteNetworkStores true

4. Read the plist with the following command
   defaults read com.apple.desktopservices DSDontWriteNetworkStores
4. Either restart the computer or log out and back in to the user account.

This applies the setting to the current user but does not impact any other users.  To apply this to all future users who login to the machine copy the .plist file from the user directory to the user template with this command:

Sudo cp ~/library/preferences/com.apple.desktopservices.plist

If you need to disable .ds_store files for an existing user use this command:

Sudo cp ~/library/preferences/com.apple.desktopservices.plist

One Comment

  • Reply Jason Snyder |

    In a case sensitive formatted partition, you will need capitals for System, Library, and Users. Ditto is typically a better copy function than cp. By default, ditto does not overwrite existing files in the target directory. Also, ditto, by default, preserves mode, access time, permissions and all other file attributes. cp needs additional flags to do some of these things. When in doubt, ditto.

So, what do you think ?