10

When Mac OS X clients copy files in a Windows share, they'll create some files like .DS_Store and ._ prefixed hidden files (that I think store resource forks of the files).

How can I prevent pollution of these shares by these files?

A solution that works on other media (flash driver, for instance) is also appreciated.

drAlberT
  • 10,871
  • 7
  • 38
  • 52
mmx
  • 482
  • 1
  • 8
  • 19

6 Answers6

14

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
splattne
  • 28,348
  • 19
  • 97
  • 147
3

To prevent .DS_Store files on Network Drives.

From Terminal:

defaults write com.apple.desktopservices DSDontWriteNetworkStores true
Dave K
  • 2,751
  • 2
  • 21
  • 17
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.

Chealion
  • 5,713
  • 27
  • 29
2

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

2

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.

1

I can't comment on answers, but want to mention that you need to be very careful about veto-ing files, as Finder will choke when trying to copy files, as I detail here.