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

2 Answers 2

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.

1
  • 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, 2011 at 5:17
1

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

3
  • I actually dont see them, more the principle behind the matter.
    – Rudiger
    Mar 20, 2011 at 12:11
  • Well, the correct way of handling such a situation is to use an alternative data stream, which is not possible because of NTFS
    – BobC
    Mar 21, 2011 at 7:26
  • There is no NTFS or windows machines in use here
    – Rudiger
    Mar 26, 2011 at 23:42

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .