[Samba] changing macintosh type and creator codes
mkh01 at earthlink.net
Thu Feb 14 14:44:02 GMT 2002
Right, Samba/Windows doesn't have any concept of type/creator codes,
they just embed that information in the name as an extension and hope
everything works out OK. Different Mac<->other-OS connectivity tools use
different methods to preserve that information, often the resource fork
and extended attributes are placed in a subdirectory. Since Samba and
the Windows clients are blissfully ignorant of this extended
information, copying files to/from Windows clients will essentially
throw this information away. It may still be on the drive, but any
intelligent system will realize that the two aren't even close to the
same age and discard the extended information.
Two possible solutions come to mind. One is to make the Macs smarter
about handling filename extensions. I'm not familiar with Dave (if
that's what you're using), but I'd assume that it either has the ability
to do the mapping or to use the system-wide mappings that are provided
as defaults when mounting PC disks. The other is to make the server
smarter by using Netatalk or one of the other AppleShare server packages
for UNIX. They generally provide some way to map extensions to a default
type/creator when one isn't available through the preserved metadata.
The second is what I use on my home network. I have a few directories on
my Linux PC exported through both Samba and Netatalk, and mount them on
whichever machine I happen to be using (Windows via SMB or Mac OS 9 via
AppleShare-IP). I suppose file locking could be an issue in a larger
On Thu, Feb 14, 2002 at 04:09:33PM -0500, Hactar wrote:
> On Thu, 14 Feb 2002 cneely at cybermemphis.com wrote:
> > Anytime a PC on our network copies a file to our server and a
> > macintosh client goes to view that file, the type and creator codes
> > are incorrect.
> I think I know what the problem is, but I don't know how to fix it. Macs
> keep metadata associated with a file -- its type, creator, creation date.
> etc. The type and creator info are the most important for most uses, as
> they determine the icon attached to a file / what is run when you
> double-click on it. Some file sharing systems have a mapping from
> extension -> type/creator.
> A partial solution is something on the Mac that assigns type/creator info
> based on a file's name.
> > I can copy a file to the server from a Mac then copy the file from the
> > server to a windows machine and back again and the type and creator
> > codes will be changed.
> Maybe the metadata file is not copied back? Dunno. Make sure you're not
> preventing some files (matbe dotfiles?) from being copied.
That feeling just came over me.
-- Albert DeSalvo, the "Boston Strangler"
More information about the samba