1

I've set up Samba share on a Centos system and all works fine except whenever I copy a file using OS X Finder to a share it makes two files, the actual file and what looks to be a log file, which has an appending ._ on the front of it.

So for example if I copy index.php it copies that one, plus it creates ._index.php with semi looking log info in it.

How do I stop Samba doing this? I'm sure its in smb.conf somewhere but can't find it.

Cheers

Rudiger
  • 191
  • 1
  • 15

2 Answers2

3

It's not Samba, it's the OS X client. Since the Samba share doesn't support Mac-style file attributes (resource fork, type&creator codes, Finder flags, extended attributes, etc), the OS X file system will split the file into the AppleDouble format, storing the data fork (regular file contents) as one file, and all of the unsupported metadata in a second file with a "._" prefix on the name.

I don't think there's any way to stop the OS X client from doing this (there's a way to prevent ".DS_Store" files, but that doesn't work for the AppleDouble files). There are various programs and scripts that'll remove the AppleDouble files (e.g. BlueHarvest). Unfortunately, for some file types they're actually an integral part of the file (these are, of course, Mac-specific formats like Finder aliases), so depending on what kind of files you're storing, you might wind up deleting something important.

Gordon Davisson
  • 11,216
  • 4
  • 28
  • 33
  • heh, They must have a script at work that deletes it because I've never had this problem on that network. I'll look into it. – Rudiger Mar 20 '11 at 05:17
1

Actually the trick is to hide system files on windows machine. This way you shouldn't see files beginning with dot "."

BobC
  • 432
  • 4
  • 9