Subject: Re: Apple File Utilities for Netatalk

From: [email-masked]
Date: Thu, 20 Apr 2000 15:22:16 -0400

[email-masked], [email-masked] writes:

>Is anyone aware of any sort of perl modules
>for talking with netatalk's appledouble directory structures?

I don't know about doing this on the netatalk server, but there are 
plenty of utilities on the Macintosh which do this and would be more 
likely to leave everything the way it should be.  File Buddy is one.  
Programmers could use Applescript.  Or, if you're into Perl, you could 
even use MacPerl.

BOL,

--
Jim Hart

"Open source software gives the system administrator
 the flexibility to make software work as needed without
 vendor-imposed limitations.  May the source be with you."

---

From: Rusty Carruth <[email-masked]>
Date: Tue, 25 Apr 2000 14:07:55 -0700

Well, I have everything working perfectly (well, ok, its good enough
for now, anyway ;-), except for one thing which is getting REALLY
irritating:

After approximately 2 minutes of no activity, the atalk server (apparently) 
disconnects from the client  (I say apparently because I'm not sure if its
the server or the client initiating the disconnect).

Specifics:

RH linux 6.1 with 

	kernel 2.2.12  (sorry folks, I lied in other emails! 
			(thought it was 2.2.14 - that's because 
			the OTHER netatalk machine is 2.2.14!))
	tools .90 (I think)
	netatalk-1.4b2+asun2.1.4  (the test one)

the mac is a powerbook with:

	mac os9.0.4
	128 meg ram (not that this should matter!)
	Appletalk Control Panel says "Appletalk 1.1"
	TCP control panel says "TCP/IP 2.5"

(I basically updated everything a week or so ago from the apple web site)

Oh - one other straange thing - when I go to chooser, select the zone, and
click on the machine's entry, I get a "Contacting machine" box that, if I
hit cancel, it says something about switching back to appletalk, then everything
proceeds normally (I get the "Connect to the file server "machine" as:" dialog).
(hmm.  I tried to see if I could figure out what part of the mount process
the time was related to, and managed to break atalkd entirely such that
I had to stop and restart everything.  And now the connection is staying up -
has been up for 10 minutes! More testing will follow, news at bottom of this
missive!)

my afpd.conf says, basically:

"machine" -noguest -rand2num   -loginmesg "Contains proprietary info!  If you
were not invited, leave NOW!"

my AppleVolumes.default says, basically:

~
/theApplePlace "machine"       options=crlf,noadouble password=howdyDooDah
/tmp/tmp       "private, temporary" access=fakedude options=crlf,noadouble

and, of course, my atalkd.conf is pretty boring:

eth0 <junk filled in by atalkd>

Hmm.  I was going to send along the stuff from syslog, but I see all I have
is old messages, possibly from before my last changes.  Thought I had messages
still going, apparently not - and I've not been able to find the doc that
told me how to get it working!  hmm...  anybody want to tell me where the
Fine manual went I'd appreciate that also!

rusty

ok, here's the scoop.  After stopping and restarting netatalk suite, my first
connection stayed up for 10 minutes.  I then tried adding the OTHER export
(the home dir).  I had to hit cancel, as mentioned above.  Mount went fine,
stayed connected for another 5 minutes, disconnected first share, the second
one (home dir) stayed up until I disconnected it 3 minutes later (I've never had 
it stay up longer than 2.5 minutes when it was automatically disconnecting).
HEY!
My warning message is gone!  But its still in the config file.  Ok, restart
again (using 'stop', wait a second or 2, 'start', not using 'restart').  Now
the login message shows up.  Ok, I give up!  It is still connected 3 minutes
later!

So, the short summary is - this is NOT consistent!  Or at least, until it
starts failing its not consistent.  Once it starts disconnecting after 2 
minutes, it will NEVER stay up permanently.  It MAY be related to 
suspend/resume, it may not.  It may be related to zones (i've had problems
with zones here before), it may not.  It may just be related to the phase
of the proton stream, for all I know! ;-) / 2   It may be related to how long
the daemons are running - again, I'm just shooting in the dark....

help - I've lost my mind again!  ;-)

---

From: David Blache <[email-masked]>
Date: Tue, 25 Apr 2000 18:50:26 -0500

Here we go again...  ;)

I've just installed Redhat 6.1 on an AMD machine.  I grabbed my netatalk
1.4b2+asun2.1.3 sources, did a make gcc followed by a make install, copied
the atalkd.conf, afpd.conf, and AppleVolumes.default & system files to the
/usr/local/atalk/etc/ directory, and started /etc/rc.d/init.d/atalk.  I get
the following error:

# starting appletalk deamons: atalkdnbp_rgstr: Connection timed out
Can't register microcosm:Workstation@*
nbp_rgstr: Connection timed out
Can't register microcosm:netatalk@*
nbprgstr papd afpd.

I looks as though I may have some network stuff set up incorrectly?  Or
maybe this is as simple as fixing something in netatalk's Makefile(s)?

Can someone give me a clue?  Like I said, this is a brand-new redhat 6.1
install, with netatalk 1.4b2+asun2.1.3 sources.

---

From: andrew morgan <[email-masked]>
Date: Tue, 25 Apr 2000 18:14:49 -0700 (PDT)

> install, with netatalk 1.4b2+asun2.1.3 sources.

Try adding:

alias net-pf-5 appletalk

to your /etc/conf.modules file.

	Andy

---

From: "Seth D. Mattinen" <[email-masked]>
Date: Tue, 25 Apr 2000 19:29:07 -0700

> install, with netatalk 1.4b2+asun2.1.3 sources.

This happened to me when I was IP aliasing (eth0 and eth0:1) on the
interface netatalk wanted to use. My solution was to not alias IP addresses,
since it seemed to just not like it...

If you're aliasing on any of your interfaces, try getting rid of the IP
alias and see if that changes anything.

--
Seth D. Mattinen   [email-masked]   http://roller.reno.nv.us/
PGP Key: finger [email-masked]
Thou shalt not annoy. Thou shalt not be easily annoyed.

---

From: David Blache <[email-masked]>
Date: Wed, 26 Apr 2000 00:12:35 -0500

> to your /etc/conf.modules file.

What does that do exactly?  I'm kind of hesitant to do anything until I know
more about what the problem is.  I hope I'm not offending anyone.  I just
want to know what's wrong before I go messing with stuff.

I should note that I do have two ethernet cards installed.  But I've done
little or no configuration for them.

My network is set up so that my Linux box is a manually-configured device on
the network, with eth0 having the IP: 10.1.0.3, and eth1 having the IP:
10.1.0.4.  I just went into linuxconf, gave both eth0 & eth1 these
respective IPs.  And that's about the extent of any configuration I did for
them.  

I can ftp and telnet to 10.1.0.3, so I know that that IP is working ok.  But
I have no idea about the other right now.  And I don't know if this has any
bearing on the problem.  But I thought it would be better to be safe and
mention it.

---

From: David Blache <[email-masked]>
Date: Wed, 26 Apr 2000 00:13:45 -0500

> alias and see if that changes anything.

If I am aliasing an interface, I'm not doing it on purpose.  I'm not even
sure what "aliasing an interface" entails.  :/

---

From: "Seth D. Mattinen" <[email-masked]>
Date: Tue, 25 Apr 2000 22:46:19 -0700

> sure what "aliasing an interface" entails.  :/

Basically, it means giving a single ethernet card two (or more) different IP
addresses. If each of your ethernet cards only has one IP, then you aren't
aliasing. =)

It's possible you don't have the AppleTalk module loaded, or installed, on
your system. Can you connect to the machine via the IP option in the
chooser? If you can, it means netatalk is working, but you don't have
AppleTalk.

> want to know what's wrong before I go messing with stuff.

By adding that to your conf.modules file, you're telling the kernel to load
the AppleTalk module at boot time. Try running an "/sbin/insmod appletalk"
and see what it says. And if you do "/sbin/lsmod -a" it'll tell you what
modules are currently loaded.

--
Seth D. Mattinen   [email-masked]   http://roller.reno.nv.us/
PGP Key: finger [email-masked]
It's no surprise to me I am my own worst enemy.

---

From: Patrik Schindler <[email-masked]>
Date: Wed, 26 Apr 2000 08:38:20 +0200

>maybe this is as simple as fixing something in netatalk's Makefile(s)?

Whenever you encounter problems with unix and it's daemons, regardless which flavour of, look into the syslog. Valuable information can be found here.

:wq! PoC

---

From: sat <[email-masked]>
Date: Wed, 26 Apr 2000 07:21:58 -0400

I would suggest that you make sure that the appletalk network protocol is 
available on your system either via module ( and loadedc) or already 
compiled into the kernel.

The only other thing that I can think of is that if you're on a separate 
network ( no appletalk zones; no macs) , you may have to  run yourself as 
an appletalk seed router, thought I could be wrong on that.

--On Wednesday, April 26, 2000 12:12 AM -0500 David Blache 
<[email-masked]> wrote:

>>> 1.4b2+asun2.1.3 sources, did a make gcc followed by a make install,
>>> copied the atalkd.conf, afpd.conf, and AppleVolumes.default & system
>>> files to the /usr/local/atalk/etc/ directory, and started
>>> /etc/rc.d/init.d/atalk.  I get the following error:
>>>
> What does that do exactly?  I'm kind of hesitant to do anything until I
> know more about what the problem is.  I hope I'm not offending anyone.  I
> just want to know what's wrong before I go messing with stuff.
>
> My network is set up so that my Linux box is a manually-configured device
> on the network, with eth0 having the IP: 10.1.0.3, and eth1 having the IP:
> respective IPs.  And that's about the extent of any configuration I did
> for them.
>
> I can ftp and telnet to 10.1.0.3, so I know that that IP is working ok.
> But I have no idea about the other right now.  And I don't know if this
> has any bearing on the problem.  But I thought it would be better to be
> safe and mention it.

---

From: David Blache <[email-masked]>
Date: Wed, 26 Apr 2000 10:05:11 -0500

on 4/26/2000 1:38 AM, Patrik Schindler at [email-masked] wrote:

> Whenever you encounter problems with unix and it's daemons, regardless which
> flavour of, look into the syslog. Valuable information can be found here.

Hi PoC!  :)

Ok.  I took a look.  And this is what I see:

Apr 25 13:34:18 localhost atalkd[4272]: restart (1.4b2+asun2.1.3)
Apr 25 13:34:18 localhost kernel: NET4: AppleTalk 0.18 for Linux NET4.0
Apr 25 13:34:19 localhost atalkd[4272]: zip_getnetinfo for eth0
Apr 25 13:34:38 localhost last message repeated 2 times
Apr 25 13:34:48 localhost atalkd[4272]: as_timer multiple interfaces, no
seed
Apr 25 13:34:48 localhost atalkd[4272]: as_timer can't configure eth0
Apr 25 13:34:48 localhost atalkd[4272]: as_timer waiting for router
Apr 25 13:34:48 localhost atalkd[4272]: ready 0/0/0
Apr 25 13:35:04 localhost papd[4300]: restart (1.4b2+asun2.1.3)
Apr 25 13:35:04 localhost papd[4300]: No such printer: lp
Apr 25 13:35:04 localhost papd[4300]: printcap problem: lp
Apr 25 13:35:12 localhost papd[4300]: can't register microcosm:LaserWriter@*
Apr 25 13:35:14 localhost afpd[4304]: Can't register microcosm:AFPServer@*
Apr 25 13:35:14 localhost afpd[4304]: ASIP started on 127.0.0.1:548(0)
(1.4b2+asun2.1.3) 
Apr 25 13:43:27 localhost atalkd[4272]: nbp lkup sendto 41201.173: Network
is unreachable
Apr 25 13:43:58 localhost last message repeated 37 times

So Something is fsck'ed up with eth0?

-David

---

From: David Blache <[email-masked]>
Date: Wed, 26 Apr 2000 10:13:35 -0500

> addresses. If each of your ethernet cards only has one IP, then you aren't

Hi Seth,

Ok, cool.  I'm not doing that.

> chooser? 

Aha!  Yes, I can.  And TCP/IP is the way I would rather it work anyway.  But
are you saying that I am limited to this method (specifying the IP in the
Chooser) if I want to use TCP/IP?

> If you can, it means netatalk is working, but you don't have AppleTalk.

Hmm...See previous question...   ?

>>> to your /etc/conf.modules file.

Will doing this turn off Appleshare IP?  That's something I don't want to
do.

> and see what it says.

[root@microcosm pub]# /sbin/insmod appletalk
/lib/modules/2.2.12-20/misc/appletalk.o: a module named appletalk already
exists

> And if you do "/sbin/lsmod -a" it'll tell you what modules are
> currently loaded.

[root@microcosm pub]# /sbin/lsmod -a
Module                  Size  Used by
appletalk              17376  13  (autoclean)
ne2k-pci                4448   1  (autoclean)
8390                    5920   0  (autoclean) [ne2k-pci]
eepro100               12112   1  (autoclean)

So apparantly Appletalk *is* loaded.  But for some reason the machine does
not show up under Appleshare in the Chooser.  But I can connect just fine
with TCP/IP.  Hmmm...

(Thank you all for your help in this.  I don't know what I would do without
you! =)

-David

---

From: David Blache <[email-masked]>
Date: Wed, 26 Apr 2000 10:15:18 -0500

> compiled into the kernel.

I just checked, and it appears to be loaded.  What is loadedc?

> an appletalk seed router, thought I could be wrong on that.

I do have 2 Macs on the network and both are sharing over Appletalk.  So
that shouldn't be the case.

-David

---

From: "David Lancaster" <[email-masked]>
Date: Wed, 26 Apr 2000 12:26:39 -0300

> Hmm...See previous question...   ?

This may be off base (correct me if I'm wrong guys), but it sounds like you
have AFPD working fine over afpovertcp, just no AppleTalk.  I'm assuming
that somebody had you check that you had the correct entries in
/etc/services for AppleTalk and all the normal setup.

I wonder if it's related to your network card.  The first time I setup
netatalk, it worked fine, but I then swapped my 3Com 509b with an older SMC
WD8013 card, which then broke AppleTalk. (dunno if it affected afpovertcp,
as I was only using AppleTalk with my Laser IIg).  Putting the 3Com card
back in worked, so I believe it had something to do with the capabilities of
the card.  (I vaguely recall something about the card having to support a
promiscuous mode or something to work right with Atalk.....obviously I need
less volatile memory. :)

David Lancaster

---

From: David Blache <[email-masked]>
Date: Wed, 26 Apr 2000 18:46:34 -0500

> /etc/services for AppleTalk and all the normal setup.

I'm going to go over the installation and setup procedures again to se if I
missed something.

> promiscuous mode or something to work right with Atalk.....obviously I need

But I can connect just fine using TCP/IP.  And this was working before on
the same network card.  So it's gotta be software-related.

---

From: Donald Lee <[email-masked]>
Date: Wed, 26 Apr 2000 20:00:53 -0500

There is a very recent fix in the NetBSD 1.4.2+ source where the network
interface selection was broken.  (in sys/net/if.c at about line 220)

If the linus/redhat distribution is close to the NetBSD 1.4.2
distribution, this sounds pretty familiar...

-dgl-

---

From: "David Lancaster" <[email-masked]>
Date: Wed, 26 Apr 2000 22:20:55 -0300

I asked this earlier, but I thought I'd repost with a little more detail to
see if I can stimulate a few synapses.

The scenario is this:
Redhat 6.0 server
netatalk-1.4b2+asun2.1.3-7

The major objective/sticky point is creating user accounts so that clients
can upload files, and Customer Service can read/write to said files.  I want
to prevent Clients from reading each others data.

The only way I can figure for this to work is to create a seperate group for
each Client, and add Customer Service to it.

ie.
/home/Clients/joeclient    (shared via ~ to joeclient in afpd.conf, and via
a share of /home/Clients to Customer Service)
permissions:   rwxrws---   joeclient.joeclient

Then when joeclient writes a file, it gets permissions rwxrwx---
joeclient.joeclient, and Customer Service can read it since it is a member
of the joeclient group.
If Customer Service throws a file in joeclient's folder, it gets rwxrwx---
custserv.joeclient (setgid forces the group) and joeclient can read it since
it is a member of the joeclient group.

I can't think of any easier way to do this (but then again, my exploration
of *nix permissions is somewhat limited), so I'd appreciated any commentary
that anyone can give.  I'd rather not have to create and maintain a group
for each client, but without ACLs, I can't see any way to set the relevant
permissions.

David Lancaster

---

From: Patrik Schindler <[email-masked]>
Date: Thu, 27 Apr 2000 08:36:59 +0200

>Apr 25 13:34:48 localhost atalkd[4272]: as_timer waiting for router

Quiet clear:
You have more than one network card and neither of them has an AppleTalk router attached which tells atalkd the right configuration of the interfaces. Remember: With every network interface you have, you must use different network numbers to get routing to work.
So atalkd must be told which configuation for which card to use and that atalkd should distribute this information (seeding).

eth0 -seed -phase 2 -net 40-49 -addr 41.1 -zone "PoC"
eth1 -seed -phase 2 -net 50-59 -addr 51.1 -zone "PoC"

:wq! PoC

---

From: Philip Bertuglia <[email-masked]>
Date: Thu, 27 Apr 2000 09:18:54 -0400 (EDT)

This look like a good layout but, just for fun, try to move a complicated
directory structure into /home/Clients/joeclient via the netatalk mount.
I have not been able to get more then one file deep into a SGID bit
directory without the writer being the owner of the share. 

Philip Bertulgia
System Administrator
Wheaton College, MA

---

From: David Blache <[email-masked]>
Date: Thu, 27 Apr 2000 10:40:32 -0500

on 4/27/2000 1:36 AM, Patrik Schindler at [email-masked] wrote:

> You have more than one network card and neither of them has an AppleTalk
> router attached which tells atalkd the right configuration of the interfaces.
> Remember: With every network interface you have, you must use different
> network numbers to get routing to work.
> So atalkd must be told which configuation for which card to use and that
> atalkd should distribute this information (seeding).
> 

Hi again, PoC :)

Aha!  Ok.  Let me try this...

Ok I added those entries, and did:

# /etc/rc.d/init.d/atalkd stop
# /etc/rc.d/init.d/atalkd start

It looks like it started up ok.  But I still don't see anything in the
Chooser or in Network Browser.  But I can connect via TCP/IP in the Chooser.
Hmmmm...

Taking a look at /var/log/messages...

My god what is all this stuff?  The log is full of these types of entries:

Apr 26 20:09:56 localhost afpd[9849]: iconopen: open
/home/ftp/.AppleDesktop/S/SJAM.icon: No such file or directory
Apr 26 20:09:56 localhost afpd[9849]: afp_addicon: No such file or directory

SJAM is SoundJam's creator code....

Ok, anyway, back to the problem at hand...

Apr 27 05:37:33 localhost atalk.init: papd shutdown succeeded
Apr 27 05:37:33 localhost afpd[11568]: 2025.73KB read, 347.60KB written
Apr 27 05:37:33 localhost PAM_pwdb[11568]: (netatalk) session closed for
user upload
Apr 27 05:37:33 localhost afpd[4452]: server_child[1] 11568 done
Apr 27 05:37:33 localhost afpd[4452]: shutting down on signal 15
Apr 27 05:37:34 localhost atalk.init: afpd shutdown succeeded
Apr 27 05:37:34 localhost atalkd[4436]: done
Apr 27 05:37:34 localhost atalk.init: atalkd shutdown succeeded
Apr 27 05:37:40 localhost atalkd[13615]: restart (1.4b2+asun2.1.3)
Apr 27 05:37:41 localhost atalkd[13615]: zip_getnetinfo for eth0
Apr 27 05:38:00 localhost last message repeated 2 times
Apr 27 05:38:10 localhost atalkd[13615]: as_timer configured eth0 phase 2
from seed
Apr 27 05:38:11 localhost atalkd[13615]: zip_getnetinfo for eth1
Apr 27 05:38:20 localhost last message repeated 2 times
Apr 27 05:38:30 localhost atalkd[13615]: as_timer configured eth1 phase 2
from seed
Apr 27 05:38:30 localhost atalkd[13615]: ready 0/0/0
Apr 27 05:38:42 localhost papd[13627]: restart (1.4b2+asun2.1.3)
Apr 27 05:38:48 localhost afpd[13631]: microcosm:AFPServer@* started on
51.1:128 (1.4b2+asun2.1.3)
Apr 27 05:38:48 localhost afpd[13631]: ASIP started on 127.0.0.1:548(1)
(1.4b2+asun2.1.3) 
Apr 27 05:38:54 localhost PAM_pwdb[13564]: (su) session closed for user root
Apr 27 05:39:04 localhost atalkd[13615]: nbp lkup sendto 41201.173: Network
is unreachable
Apr 27 05:39:07 localhost last message repeated 4 times

So what does "atalkd[13615]: nbp lkup sendto 41201.173: Network is
unreachable" mean?

---

From: Patrik Schindler <[email-masked]>
Date: Thu, 27 Apr 2000 18:26:42 +0200

At 10:15 Uhr -0500 26.04.2000, David Blache wrote:
>What is loadedc?

A typo? :-)

:wq! PoC

---

From: Patrik Schindler <[email-masked]>
Date: Thu, 27 Apr 2000 18:42:12 +0200

>Hi again, PoC :)

Hi to you, too :-)

>SJAM is SoundJam's creator code....

Hm, maybe your .AppleDesktop Directory got corrupt. I think you may safley delete it (if no afpd is accessing it at all). Any comments on this?

>Apr 27 05:38:30 localhost atalkd[13615]: ready 0/0/0

Very nice 'til here.

>So what does "atalkd[13615]: nbp lkup sendto 41201.173: Network is

This is the old, unseeded network.
Just switch AppleTalk off and back on on your Mac (or if you want wo waste your uptime, just reboot).
Sometimes, AppleTalk would not adapt automagically to a new network configuration. Sometimes it's even harder: You'll have to delete the AppleTalk Preferences File and do a PRAM-Zap prior to re-configure your AppleTalk connection back to Ethernet.

:wq! PoC

---

From: "Seth D. Mattinen" <[email-masked]>
Date: Thu, 27 Apr 2000 12:18:13 -0700

> Chooser) if I want to use TCP/IP?

The Mac will try (assuming you're using a version of AppleShare that
supports it) to connect via TCP/IP, and then fall back to AppleTalk if that
fails. So you'll most likely always get a TCP/IP connection, and you can
verify that by doing a "Get Info" on the mounted server volume.

> Apr 27 05:38:48 localhost afpd[13631]: ASIP started on 127.0.0.1:548(1)

As you can see here, both the AppleTalk and ASIP servers are running, so it
should work nicely now. =)

--
Seth D. Mattinen   [email-masked]   http://roller.reno.nv.us/
PGP Key: finger [email-masked]
There are two sides to every story. Every story has an end.

---

From: R Cent <[email-masked]>
Date: Thu, 27 Apr 2000 18:42:12 -0700 (PDT)

Hi,

Much to my suprise, I discovered today that when I change the
name of a Mac file or copy and paste a Mac file while in Linux
that the file becomes unusable to Mac users (looses it's creator
and type).  Later I was testing a new SCSI tape backup and was
pleased to learn that I could backup and restore a Mac file from
Linux and maintain usability by Mac users.

Is there a way to recover the Mac file creator and types if a
Linux command loses it?

_____________________________
Bob Cent 
University of Washington
Box 357330
Seattle, WA  98195-7330  

mailto: [email-masked]
voice:  206.543.1433
fax:    206.685.0305
_____________________________

---

From: Andrew McNabb <[email-masked]>
Date: Thu, 27 Apr 2000 21:02:32 -0500 (CDT)

All of the Mac info is stored in files in the ".AppleDouble" subdirectory
of each directory.  If you move these files to their correct locations,
everything should work correctly.

IIRC, someone once wrote some simple scripts to make rm, mv, cp, etc., do
all of this automatically.  Does anyone remember any more details?

> Is there a way to recover the Mac file creator and types if a

----------------------------------------------
                Andrew McNabb
             Argus Systems Group
          [email-masked]
----------------------------------------------

---

From: Steven Karel <[email-masked]>
Date: Thu, 27 Apr 2000 23:03:38 -0400 (EDT)

for scripts to move files together with associated .AppleDouble files,
see:

http://www-genome.wi.mit.edu/ftp/distribution/software/Bass/bass-1.30a/apple_uti
l/  

3 scripts -> apple_mv, apple_cp, apple_rm

On
Thu, 27 Apr 2000, Andrew McNabb wrote:

> > and type).