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.
This Apple support article explains how to do this:
Mac OS X 10.4: How to prevent .DS_Store file creation over network connections
To prevent .DS_Store files on Network Drives.
From Terminal:
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:
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
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.
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.