Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

share|improve this question
add comment

6 Answers

up vote 13 down vote accepted

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
share|improve this answer
3  
That will just fix the .DS_Store files. It won't affect other files. –  LeakyCode May 29 '09 at 19:47
1  
By the way, there's a typo in "com.apple.desktopservices." I don't have enough rep to edit... –  LeakyCode Jun 5 '09 at 14:18
    
Typo fixed, thanks. –  splattne Jun 5 '09 at 15:36
add comment

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

http://serverfault.com/questions/4599/file-shares-for-mac-users http://serverfault.com/questions/5564/what-are-dsstore-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.

share|improve this answer
add comment

To prevent .DS_Store files on Network Drives.

From Terminal:

defaults write com.apple.desktopservices DSDontWriteNetworkStores true
share|improve this answer
add comment

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.

share|improve this answer
add comment

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.

share|improve this answer
add comment

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

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.