Preventing Mac OS X clients from polluting Windows shares with resource forks

Solution 1:

This Apple support article explains how to do this:

Mac OS X 10.4: How to prevent .DS_Store file creation over network connections

  1. Open the Terminal.
  2. Type:
    defaults write com.apple.desktopservices DSDontWriteNetworkStores true
  3. Press Return.
  4. Restart the computer

Solution 2:

To prevent .DS_Store files on Network Drives.

From Terminal:

defaults write com.apple.desktopservices DSDontWriteNetworkStores true

Solution 3:

I suggest checking out these other questions on Server Fault as well:

File shares for Mac users What are .DS_Store files and why does OSX leave them on Windows shares?

As far as I know you can not disable the saving of resource forks as separate files (I'd love to be wrong here) as it's part of the design to avoid losing data on a non-HFS or UFS drive in Mac OS X. However it is possible to "veto" these files from being created on the server - but beware of certain programs that actually do require the resource fork (eg. Quicken).

To veto the files taken from the first question listed above:

Additionally you should be aware that over SMB you will notice ._FILENAME files created - this is how OS X maintains the resource fork data and such on other file systems. This can cause an issue for someone on a Windows based machine if they try to open up the wrong file.

It's possible to have the server not allow these files (in smb.conf you can set veto_files=._*) but where it is in Windows Server 2003 I'm unsure but I believe using this article from TechRepublic should prove a worthwhile starting point.

Solution 4:

I don't know if you can stop the resource forks, but you can stop creating .ds_store files on network shares by issuing the following command to each client:

defaults write com.apple.desktopservices DSDontWriteNetworkStores true

Solution 5:

There is a third party utility called Blue Harvest ($13) that solves the problem in an unelegant way, but totally transparent to the user. It lets Finder create the files and afterwards immediately goes in and erases them. It has been quite stable and reliable for me, working against a Windows Small Business Server 2003 via smb.