Friday, January 28, 2011

OS X Client & Ubuntu Server - Best way for client to access files on server?

I've got a local development web server running Ubuntu. I also have an iMac running OS X 10.6 which I use a client and is my development machine.

I'm currently have Samba server installed on my Ubuntu server. I have shares setup for all the website directories.

I then use my Mac and Coda to edit the files via their shares.

This generally works really well but I noticed that my Mac was writing loads of resource fork ._filename files everywhere. I found out the following about the files:

These files are created on volumes that don't natively support full HFS file characteristics (e.g. ufs volumes, Windows fileshares, etc). When a Mac file is copied to such a volume, its data fork is stored under the file's regular name, and the additional HFS information (resource fork, type & creator codes, etc) is stored in a second file (in AppleDouble format), with a name that starts with "._". (These files are, of course, invisible as far as OS-X is concerned, but not to other OS's; this can sometimes be annoying...)

Does anyone know of a way of sharing files between a Mac client and a Linux server that is most compantable between the two operation systems?

Ideally it needs to support the HFS filesystem so that the resource forks are not created and it also needs to support the permissions between server and client.

  • You can force Samba to hide these dot files for other SMB clients with the option

    hide dot files = yes
    

    in your smb.conf.

    This works reasonably well in regard to hiding the files (as long as users don't tell the Windows explorer to show them hidden files) but this doesn't solve the fundamental problem, as the pair of file and corresponding dot file tend to get out of sync quickly when non Mac OS systems are involved. This happens when you rename, delete or move a file in Linux or Windows and the dot file will not be changed accordingly.

    To really solve the problem years ago, I had to switch to MacOS X server on the backend, but that has some other drawbacks and I am not sure I would do this again.

    From SvenW
  • What about using the "veto files" directive in samba?

    Something like:

    [sharename]
     ... other settings...
    Veto files = /*._*
    

    I've never used it but it should work :)

    ref: http://www.samba.org/samba/docs/man/manpages-3/smb.conf.5.html#VETOFILES

    From sideh

0 comments:

Post a Comment