Subject: maintaining type/creator

From: Brice Ruth <[email-masked]>
Date: Sun, 03 Sep 2000 18:21:33 -0500

Simple question (I hope): is it possible to *absolutely* maintain
type/creator codes when storing files on a Linux box via netatalk?  Do I
need to create an HFS+ volume or configure something?  The point is
this: the linux box is meant to be a backup location for two Macs (one
on Sys 8.6, the other on 9.0.4).  However, in my current setup (nothing
special) it seems that items will lose their type/creator codes - most
notably, extensions, control panels, etc.  I need to avoid this or I'll
have to buy a G4 and run Mac OS ...

Regards,
Brice Ruth

---

From: Harry Zink/Netatalk List <[email-masked]>
Date: Mon, 04 Sep 2000 00:24:51 -0700

on 9/3/00 4:21 PM, Brice Ruth at [email-masked] wrote:

> However, in my current setup (nothing
> special) it seems that items will lose their type/creator codes

Check the content of your AppleVolumes.System file, or rather make sure
that/if you actually have one.

What platform are you running, what version of netatalk are you using, and
how did you install it (the RPMs come with the appropriate files)

Harry
-- 
CAN'T SEE MAC IN CHOOSER UNDER RedHat 6.2: If you get errors starting
AppleTalk under RedHat 6.2 and Mandrake 7.1, you need to manually add "alias
net-pf-5 appletalk" to your /etc/conf.modules file.

---

From: Brice Ruth <[email-masked]>
Date: Mon, 04 Sep 2000 17:25:05 -0500

Harry,

Thanx for the response.  To my knowledge, I'm running the latest netatalk
(1.4b2+asun?).  I'm running on RedHat 6.2, I downloaded the src & compiled it.
I have a AppleVolumes file in the user's home directory, but from what I can
see, if it doesn't have an extension, netatalk just sends it back as UNIX/TEXT
(i.e. not what it was to begin with).  Since control panels, extensions, fonts,
etc. don't have a '.' extension, from what little I'm able to determine, the
AppleVolumes file can't help me ...

Please correct any wrongs :)

Regards,
Brice

---

From: Harry Zink/Netatalk List <[email-masked]>
Date: Mon, 04 Sep 2000 18:35:21 -0700

on 9/4/00 3:25 PM, Brice Ruth at [email-masked] wrote:

> To my knowledge, I'm running the latest netatalk
> (1.4b2+asun?).

'the latest' is not a version number, as there are several options, both
semi-release, and testing available. In order to get an idea, you'd need to
provide a version number.

> (i.e. not what it was to begin with).

As far as I know, the AppleVolumes.system (exact syntax) file needs to be in
a central directory, and have the proper permissions set (it needs to be
able to be read by netatalk).

You are probably refering to .AppleVolumes directories, or should look for
the central AppleVolumes.system file.

> Since control panels, extensions,
> fonts, etc. don't have a '.' extension, from what little I'm able to
> determine, the AppleVolumes file can't help me ...

As previously stated, Mac files do not need extensions to show up - they
will be properly recognized. Contrary to another statement, though, you *DO*
need the AppleVolumes.system file to be present - it is not just a
'convenience', as removing it from a functional system reduces all filetypes
to blank generics.

Harry

---

From: Sak Wathanasin <[email-masked]>
Date: Tue, 5 Sep 2000 09:59:54 +0100

In reply to Harry Zink/Netatalk List's message of the 04/09/2000 at 
18:35 -0700,

>'convenience', as removing it from a functional system reduces all filetypes

No, the previous poster was correct: the extensions map in the 
AppleVolumes.system is used ONLY for files that are NOT created by a 
Mac. The MacOS filesystem maintains type/creator, icon, position, 
comments etc itself, completely integrated into the filesystem. Unix 
has no direct equivalent of this, so netatalk simulates this by 
maintaining a hidden directory .AppleDesktop at the top-level of each 
mount point.

If you copy a file to a netatalk volume with the Finder or create it 
directly using any Mac application (using, eg, "Save" or "Save 
as..."), the necessary icon &c info should be written to the netatalk 
volume regardless of the disposition of the AppleVolumes.system file 
(I've just renamed my AppleVolumes.system and tried it). If this 
isn't happening on your system, it's probably due to some permissions 
problem on the .AppleDesktop directory (or one of its 
sub-directories) preventing netatalk from writing the reqd info.

At a minimum, the perms need to be 755 on the .AppleDesktop 
directory. That's the way it should be created by netatalk if it has 
write perm to the top-level directory (the mount point). On a 
directory intended to be shared by several users, you will need to 
use setgid. For example:
	ls -ld /home/NAL
	drwxrwsr-x  20 NAL      NAL          4096 Sep  5 09:00 /home/NAL

This directory can be mounted by any member of group NAL (ie people 
in my company); the setgid bit ensures that all files and directories 
created under /home/NAL belong to group NAL and so are 
readable/writeable by any member of that group. In particular,

	drwxrws---  53 NAL      NAL          4096 Aug  3 01:09 .AppleDesktop

allows icon &c info to be propogated.

The mappings in AppleVolumes.system are needed when the file is 
created by something other than a Mac. In this case, the 
.AppleDesktop DB would not be updated, and so the Mac would "see" the 
file as a generic (blank) icon. So netatalk uses the filename 
extension and the map in AppleVolumes.system to fake a creator/type 
to the MacOS. This allows one (with suitable mappings) to dbl-click 
on a file "xxx.jpg" and have it opened by Photoshop, for example.

One last tip: set the default mapping to DATA, not TEXT:

.   DATA    ????

This helps to prevent unwanted CR/LF translations - if netatalk 
thinks something is a text file, it maps LF <-> CR on-the-fly to make 
the file more palatable to Mac appls that are expecting a text file. 
You don't want this if the file really is a binary file (a graphics 
file for example). Modern Mac text editors can cope with any combo of 
CR/LF as a line-ending, so it's not a big issue anymore.
-- 
Sak Wathanasin
Network Analysis Limited
178 Wainbody Ave South, Coventry CV3 6BX, UK

Internet: [email-masked]
Phone: (+44) 24 76 41 99 96        Mobile: (+44) 79 70 75 19 12 
Fax: (+44) 24 76 69 06 90

---

From: [email-masked]
Date: Tue, 05 Sep 2000 10:06:16 -0400

> From:    Sak Wathanasin <[email-masked]>
> To:      [email-masked]

> maintaining a hidden directory .AppleDesktop at the top-level of each 

Actually, .AppleDesktop should have creator/type to icon mappings and
creator to pathname mappings.  Icons are stored both in .AppleDesktop
and usually in the application.  Creator and type themselves are store
in the AppleDouble header file, as are position and comments.

:wes

---

From: Sak Wathanasin <[email-masked]>
Date: Tue, 5 Sep 2000 15:54:06 +0100

In reply to [email-masked]'s message of the 05/09/2000 at 10:06 -0400,

>in the AppleDouble header file, as are position and comments.

Thanks for that; should have checked the src code first. Just do a 
global replace of /AppleDesktop/ with /AppleDouble/ in my last msg.

Internet: [email-masked]

---

From: Brice Ruth <[email-masked]>
Date: Tue, 05 Sep 2000 15:37:18 -0500

My sincerest apologies to the netatalk group - I'm an idiot.  I realized that the
.AppleDouble/.AppleDesktop files had something to with the type/creator codes, but
before I really understood what was going on, I had tried to burn a CD in an
effort to backup a system - upon finding all these _extraneous_ hidden folders, I
removed them, thus annihilating any type/creator information.

Netatalk does indeed work as advertised - thanx for setting me straight!

On a different note ... has anyone ever printed to an lpd spool via the "Desktop
Printer Utility" ?? I'm having some issues and I can't quite nail them down ...

Regards,
Brice

---

From: [email-masked]
Date: Tue, 5 Sep 2000 17:51:02 -0400 (EDT)

On Tue, 5 Sep 2000, Brice Ruth wrote:

[snip]

> On a different note ... has anyone ever printed to an lpd spool via the
> "Desktop Printer Utility" ?? I'm having some issues and I can't quite
> nail them down ...

[/snip]

I'd be curious to hear about this as well; for the last several months
we've been trying (mostly in vain) to get our network's Macs to print to a
Xerox P12 laser printer that's hanging off an AXIS 540+ micro printserver.
The salient point is that this printer is not postscript-compatible, and
I've been struggling with apsfilter/magicfilter and netatalk to gain a
satisfactory solution to this problem. 

Last attempt had an lpd queue which did nothing but pass the print data
thru a postscript-to-pcl filter and then respool to another queue which
then blasted this data at the AXIS. The idea was/is that the Macs would
print (preferably via the DPU) to the Linux machine (LinuxPPC 2.2.6-15,
currently), which would in turn make the appropriate translations and pass
the results to the AXIS and print correctly. Am I off my rocker in
thinking that this should work?

Comments would be appreciated,

-sth

--
Sam Hooker
Computer Audio/WWW Services
homebrewed concoctions, LLC
(802)846-1845
www.hbconcoctions.com

---

From: Brice Ruth <[email-masked]>
Date: Tue, 05 Sep 2000 17:22:46 -0500

don't know how, but I got it to work ... I basically covered all the bases, so
I don't rightly know what was wrong -

entered the clients that would be printing into /etc/hosts
entered the clients that would be printing into /etc/hosts.lpd &
/etc/hosts.allow
turned on logging in lpd (via lpd -l )

voila! all works now ... occasionally get weird issues, (like a log message:
protocol screwup - guessing that's Apple's problem) but all in all, it works.

---

From: Harry Zink/Netatalk List <[email-masked]>
Date: Wed, 06 Sep 2000 11:44:47 -0700

on 9/5/00 1:37 PM, Brice Ruth at [email-masked] wrote:

> effort to backup a system - upon finding all these _extraneous_ hidden
> folders, I removed them, thus annihilating any type/creator information.

Ouch! Always burn from your Mac, when you want to burn a Mac OS disk - it's
good advice that can't be stated often enough.

Harry

---

From: Paul Schinder <[email-masked]>
Date: Thu, 7 Sep 2000 08:30:03 -0400

>good advice that can't be stated often enough.

cdrecord under Linux is perfectly capable of burning Mac OS disks, 
and it's a lot better at it than the Toast than came with my CD-RW 
drive on the same hardware.  (For one thing, you don't have to reboot 
the machine with extensions off, and you can use it for other things 
(within reason) while you're burning.)  There's even a flag to pick 
up resource forks and type/creator from netatalk's .Apple* files.

Personally, I *always* burn under Linux, even when I'm making the 
backup disks for my iBook.

-- 
--
Paul J. Schinder
NASA Goddard Space Flight Center
Code 693
[email-masked]