Subject: Bug? (not x-posted to devel): "/" in filename = "Type -50" error

From: Richard Michael <[email-masked]>
Date: Tue, 6 Mar 2001 13:29:05 -0500

Hello,

I've been using Netatalk and CAP for a few years, and have come across
this a few times.  I think most of my users have seen it before, but
probably work around it without telling me.

I'd consider this a bug; unless it's been well documented and I haven't
noticed.  I've checked the docs section of sourceforge, the Linux
Netatalk HOWTO, and the Netatalk FAQ from 1.4b2.

That said, I'm sure admins have been experiencing this problem, and I've
seen it discussed on netatalk-admins before.

The problem is that when a file on a Mac contains the "/" character, a
"Type -50" will be returned from the server.

I've found this as recently as MacOS 9.0.1 w/ AppleShare 3.8.5.

Philosophically, I think it's a server side problem, since "/" is a
valid Mac filename character and, accordingly, an Apple AppleShare
server wouldn't expect it to be escaped or protected.

I'm speculating that the -50 (see below) is returned because the
"subdirectories" resulting from the name confusion don't exist (implying
no permission to write/read/stat).  For example (a common user naming
scheme): "My File - Changed 01/03/06"; where "My File - Changed 01" and
"03" become "directories" to afpd.

I know this is usually explained as a .AppleDouble (or .finderinfo)
perms problem, but in my most recent experience the user was able to
copy another file (to the same dir, etc. etc.) without a problem.  There
were no "/" characters in the second test file and when the "/"
characters were removed from the name, the copy succeeded.

I've been cautioning my users against "exotic" naming characters for
years, to work around PC->Mac translations; stick to a-Z,-,_," "
(avoiding " " when possible).

For reference,

At TIL: 
        "-50 paramErr Error in user parameter list"
At http://www.muc.edu/CIS/HelpDesk/faqs/MacErrorCodes.html:
        "-50 Error  getting file position"

Comments?  Does everyone know about this and I've just explicated the
obvious?  Shouldn't Netatalk's afpd map the "/" character, as CAP and
Netatalk do with the Icon: hex names?

Regards,
Richard

---

From: Jason Quigley <[email-masked]>
Date: Tue, 06 Mar 2001 20:02:05 +0100

Hi Richard!

When was the last time you upgraded the server? What version are you
running?

I don't have this problem saving from within apps or copying via the finder.
I don't get this with folders either.

My version is: netatalk-1.4.99-0.20001108

Cheers,
Jason.

> Hello,
<snip> 
> Netatalk HOWTO, and the Netatalk FAQ from 1.4b2.
<snip>

---

From: Marc Miller <[email-masked]>
Date: Tue, 6 Mar 2001 11:11:22 -0800 (PST)

Well, yeah!  I even made sure that worked in my dropkludge patch to
1.5.  What version are you using?  If you're using pre4 or newer, maybe
one of the recent contributions broke it & we need to go through and find
it.

> Netatalk do with the Icon: hex names?

============================================================
	/\/\arc ._|. /\/\iller ([email-masked])
	Computer Room Consultant
	Information Technology/Lab Management
============================================================
I can be contacted through the Communication Center link from
http://www.mother.com/~mjmiller/

---

From: Walt Reed <[email-masked]>
Date: Tue, 6 Mar 2001 11:50:55 -0800

yes, i just tested this out on my redhat 7.0 box running 1.5pre3.  i 
made a folder called one/two and a simpletext doc called 1/2.  both 
copied to the share and had no errors, & did not create directories. 
i was able to copy both back to the mac, no problems.  only tested 
from the finder though...

w

---

From: Richard Michael <[email-masked]>
Date: Tue, 6 Mar 2001 18:01:01 -0500

> from the finder though...

Great, so according to all those who replied, there's no problem.  This
ought to be fun to track down.  Perhaps I can get the user to recreate
another file with the exact name string with the slashes ..  I think I
turned off extreme verbose debugging too.. ugh.

This was a file that was saved locally, copied to the appleshare volume,
then copied back (so there's _already_ a copied on the server, implying
.AppleDouble entries, for those keeping track), worked with, renamed
locally and copied back to the server.  As far as I can tell, this
should result in the creation of a new file with the slashes in the
name.

How about two slashes, did anyone test that? "DateFormat foo/bar/bar"

I guess I'll test it out next time I'm at the box, I sure hope I can
duplicate it - because sure as day, we could copy other files no
problem, one had the error (slashes), remove slashes, no problem.
Pretty clear.

Thanks all.
Rich

---

From: Jason Quigley <[email-masked]>
Date: Tue, 06 Mar 2001 20:02:05 +0100

Hi Richard!

Cheers,
Jason.

<snip> 
<snip>