Subject: [netatalk-admins] afpd error messages (Was: End the Beta!)

From: Stefan Barth <[email-masked]>
Date: Fri, 12 Nov 1999 14:25:50 +0100

Hi!

ls -l /Intranet/ yields among other things:
lrwxrwxrwx   1 technisa trusty         22 Nov  5 15:06 selfhtml ->
/home/stefan/selfhtml

/Intranet is available via netatalk as Intranet, all users log in as
technisat with the same password.

The original folder resides in /home/stefan:
drwxrwxrwx   2 technisa trusty      18432 Sep  2 11:06 selfhtml

The output of df -T  concerning these locations is:
/dev/sdd6     ext2   2710699 1906946   663588     74%   /home
/dev/sdc1     ext2   7593127 2709527  4490010     38%   /Intranet

Sorry for omitting this information!
Stefan

Harry Zink/Netatalk List wrote:

> I recall those errors - invariably any troubles I ever had were due to
> incorrect permissions on relevant directories.
>
> Harry

Georg Schwarz wrote:

> you should add some information about those files, e.g. their
> permissions/owners, whether they are links, which file systems they're
> on,
> etc.

Stefan Barth wrote:

> Nov 12 13:06:28 MARKETING afpd[6182]: afp_enumerate: stat selfhtml:
>         Permission denied

---

From: Andrew McNabb <[email-masked]>
Date: Fri, 12 Nov 1999 09:19:47 -0600 (CST)

What are the permissions for /home and for /home/stefan?

> > Nov 12 13:06:28 MARKETING afpd[6182]: afp_enumerate: stat selfhtml:

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

---

From: Stefan Barth <[email-masked]>
Date: Fri, 12 Nov 1999 16:32:19 +0100

They are:

drwxr-xr-x  16 root     root         1024 Oct 29 15:49 home          and
drwx------  24 stefan   trusty       2048 Nov 12 16:20 stefan

---

From: Andrew Morgan <[email-masked]>
Date: Fri, 12 Nov 1999 08:23:30 -0800 (PST)

> drwxrwxrwx   2 technisa trusty      18432 Sep  2 11:06 selfhtml

The error occurs in etc/afpd/enumerate.c in the following code:

        if ( stat( sd.sd_last, &st ) < 0 ) {
            syslog( LOG_DEBUG, "afp_enumerate: stat %s: %m", sd.sd_last );
            sd.sd_last += len + 1;
            continue;
	}

The man page for stat(2) says:

       These  functions  return  information  about the specified
       file.  You do not need any access rights to  the  file  to
       get  this  information  but  you need search rights to all
       directories named in the path leading to the file.

My bet is that you have permissions to access the file, but not stefan's
home directory.  You must have the public execute bit set on every
directory in the path to stat the file.

	Andy

---

From: Andrew McNabb <[email-masked]>
Date: Fri, 12 Nov 1999 16:34:16 -0600 (CST)

That explains it.  If you aren't stefan, you can't follow the link through
/home/stefan.

---

From: Stefan Barth <[email-masked]>
Date: Mon, 15 Nov 1999 09:17:55 +0100

> That explains it.  If you aren't stefan, you can't follow the link through

That sounds convincing. I have moved the directory into the publicly
accessible
area and will see what happens. Thanks for your help!

Harry Zink/Netatalk List wrote:

> You might have network trash problem with that setup.
>
> Harry

That´s true. But then there aren´t that many users, and the worst that has
happened
so far is, that some items couldn´t be deleted.
I reckon this isn´t the proper way to go about it, but it was the quickest ;-)

Stefan

---

From: Andre Pang <[email-masked]>
Date: Mon, 15 Nov 1999 21:42:38 +1100

Hi all,

    I have been charged with the task of getting an AppleShare volume which
is currently mounted on NT to be shared 'on remote access'.  When I say
'remote access', I want to be able to access this AppleShare volume no
matter what ISP I've dialled up to, and from anywhere in the world.  The
AppleShare volume is currently mounted on an NT server with a static IP
address, so this shouldn't be a problem--except that the Mac Services on NT
only speak AppleTalk and not ShareIP.

    Question 1: If anybody can come up with an alternative solution to what
I've implemented below, I'd be really interested (to say the least!).

    My current workaround on this is pretty ugly, but it works (most of the
time).  My original plan was to mount the NT AppleShare volume on a Linux
server using afpfs, and share that mounted directory using afpd, which the
Macintosh would then be able to access by using the server IP address of the
Linux box.

    However, I couldn't get afpfs to talk to the NT server (it hung at some
point - I have the strace dump if somebody's really interested), and instead
of trying to stuff around with afpfs, I decided to cheat, and mounted the
share using smbfs instead.  That's caused a few other problems, but those
aren't related to AppleTalk, so I'll save that for the smb list :).

    Anyway, after mounting the NT share via smbfs, afpd worked perfectly.  I
can put in the Linux server's IP on a Macintosh and all the files will be
there, which was great.  In fact, it all works perfectly except for one
minor snag - I can't delete any files!

    I can type 'rm -f filename' on the Linux box and it'll delete it from
the directory, but if I walk over to the Mac and drag [filename] over to the
Trash, it will refuse to delete it.  Everything else works brilliantly: I
can create new files, read files, even modify and rename files - I just
can't seem to delete any.  The permissions seem to be all set correctly:

# ls -ld /import/ntserver/mac
drwxr-xr-x   1 Lansdown users         512 Nov 15 17:40 /import/ntserver/mac

# ls -l /import/ntserver/mac
ls: ICON?: No such file or directory
total 61
-rwxr-xr-x   1 Lansdown users       50976 May 12  1999 DB
.
[etc]

    Question 2: Can anybody tell me how to get a Mac connected to the afpd
share to delete a file?  Any suggestions before I start doing weird voodoo
stuff? :)

    Thanks for any help -- and a big thankyou to Adrian Sun and the Netatalk
team so we didn't have to spend extra money on implementing a ShareIP server!

-- 
: Andre Pang <[email-masked]> - Purruna Pty Ltd - ph# 0411.882299 :
:               #ozone - http://www.mindflux.com.au/ozone/               :

---

From: "Andy Daws" <[email-masked]>
Date: Mon, 15 Nov 1999 11:53:31 -0000

Ok to be able to get NT using MacIP you can use a program from Cyan Software http://www.cyansoft.de/ 
or you can wait for Microsoft to implement it in NT 2000 I believe.

Next solution try http://www.opendoor.com/shareway/ they have a product that allows a
Macintosh to act as a Gateway so you can connect to AppleTalk Servers that don't support
IP cool.

Next solution try http://www.jpy.com/ they have a hardware router that will tunnel AppleTalk over IP
and if your using iSDN will even spoof AppleTalk which is a real money saver on the phone bills.
You will need a router each end. We actually use this one and it works!

Next solution I'm sure I read somewhere that you can tunnel Appletalk over IP using linux I
just can't seem to find it again, but if you have dial-ups there will be no spoofing to prevent
dialing on NBP broadcasts and preserve bandwidth.

---

From: Thierry Michalowski <[email-masked]>
Date: Mon, 15 Nov 1999 12:54:11 +0100

> Macintosh to act as a Gateway so you can connect to AppleTalk Servers that don't support

Or simply get MacOs 9. It includes the opendoor product. Just lacks a few functionalities, like
administration tools.

--
Thierry Michalowski                                     /
Edipresse Publications S.A                 \\\' ,      / //
Informatique de Production                  \\\//    _/ //'
33,av. de la gare                            \_-//' /  //'
1001 LAUSANNE SUISSE                           \ ///  //'
phone: +41 21 349 46 26                        /  >>   \\\`
mailto:[email-masked]       /,)-^>>  _\`
                                              (/   \\ / \\\
"Unix is user-friendly...                           //  //\\\
It is just selective about who its friends are"    ((`
============================================================================
This message has been checked with GRIMEsweeper which has detected a virus
embedded in this plain text message. You should now delete your entire hard
drive and rinse your eyes with soapy water to ensure it doesn't spread.

---

From: Andre Pang <[email-masked]>
Date: Mon, 15 Nov 1999 23:18:20 +1100

On Mon, Nov 15, 1999 at 11:53:31AM -0000, Andy Daws wrote:

> Ok to be able to get NT using MacIP you can use a program from Cyan
> .
> [etc]
> .
> and preserve bandwidth.

    Sorry, let me re-state my intention: I'd like to get this NT-mounted
AppleShare volume tunneled through ShareIP for _free_ ;).

    However, thanks for all the suggestions - they'll definitely be useful
when I deal with a company which is actually willing to fork out money ...

---

From: "thomas.riewe" <[email-masked]>
Date: Mon, 15 Nov 1999 14:43:11 +0100 (CET)

> share to delete a file?  Any suggestions before I start doing weird voodoo

do you see something like
"Network Trash Folder" in the shared dir ?

btw, a question to the community:

I am used to just create 
a) Network Trash Folder/
b) Temporary Items/
on the shared volumes
and then chown root.root and finally chmod 755 them

does anyone can tell me wether there would be a reason to leave them
"open" ?

tia,
thomas

---

From: Andre Pang <[email-masked]>
Date: Tue, 16 Nov 1999 11:42:50 +1100

> "Network Trash Folder" in the shared dir ?

    No, I wasn't aware that a Network Trash Folder needs to exists.  Do you
simply 'mkdir "Network Trash Folder"' (and "Temporary Items") in the shared
directory?  (Like you've outlined below.)

---

From: Ron Chmara <[email-masked]>
Date: Mon, 15 Nov 1999 18:44:12 -0700

> AppleShare volume tunneled through ShareIP for _free_ ;).

1. Reformat NT server to a more _free_ OS. Linux or FreeBSD.
2. Install Netatalk.
3. Duplicate NT services that were on old server with Samba.

No so hard, is it? :-) (I know of a publishing industry consultant
who calls this his "NT performance upgrade".)

-Bop

---

From: Hauke Fath <[email-masked]>
Date: Tue, 16 Nov 1999 11:05:05 +0100

>who calls this his "NT performance upgrade".)

Another one: One of our NT servers that provided SMB and Atalk file 
services was upgraded to NetBSD 1.4.1 running Samba 2.0.5b (built from 
package) and Netatalk-asun2.1.4 (compiled out of the box). The whole 
lot  (4 disks, ~28 GB) and two other *nix servers (another 9 GB) is backed 
up to a Tandberg SLR5 (4 GB uncompressed) by Amanda (built from package).

The machine runs seti@home to chew up some of the redundant CPU power (PPro 
200) and still is faster than it was with NT before.

Given the problems I see on netatalk and amanda lists NetBSD looks like a 
premier server platform of choice: Any software that was conceived with 
more than one *nix in mind will build and run on it.

My 2 Pfennig,

         hauke

--
Hauke Fath                        Tangro Software Components GmbH
                                         D-69115 Heidelberg
[email-masked]                       Ruf +49-6221-13336-35, Fax -21

---

From: Hauke Fath <[email-masked]>
Date: Tue, 16 Nov 1999 12:35:39 +0100

>Netatalk-asun2.1.4 (compiled out of the box).

That should read "netatalk-asun2.1.4-35", sorry.

         hauke

---

From: "thomas.riewe" <[email-masked]>
Date: Tue, 16 Nov 1999 12:16:04 +0100 (CET)

sorry for gibberish,

if you share a volume/folder to a mac
it will create a Netw. Trash Folder when you
start deleting under two conditions
a) there isn't already a NTFolder
II.) the user currently logged in is allowed to do so

so i guess in your case you should have a look on the write permission of
the first level of the share

anyway my question was (still is) whether there are reasons for letting
people write to NTFolder and/or Temp.Items 
even if you want to force the mac-users to delete when they intend to
delete ...

cheers,
thomas