Subject: any progress on long filenames?

From: Charles Mangin <[email-masked]>
Date: Thu, 15 Nov 2001 08:55:36 -0500

i have read here before of the reasoning behind netatalk "skipping over" files with long filenames for better support of classic mac clients, thus limiting filenames to be shared to 32 characters (bla bla 32 bytes bla bla)

is there anywhere in the development tree or in the planning for future releases a mechanism to mangle long filenames to 32 chars, similar to what samba does for dos clients (8.3) or what OS X does when working with OS 9 (which should be well documented at apple, but uses some reference to the disk sector the file sits on to ensure unique filenames post-mangling)

i'd love if it were an option to be able to turn on or off name mangling vs. name dropping, since some older mc os versions are going to handle things better than newer versions, i suppose.

anyhow, i ask because i share a central linux server with macs via netatalk and windows users via samba, and the windows users tend to name their files very long and descriptive names, just to tick me off.

---

From: Jason Quigley <[email-masked]>
Date: Thu, 15 Nov 2001 17:47:03 +0100

It would be good if this was done in conjunction with the CNID database.

i.e. XXXXXXXXXXXXXXXXXXXX9999999999

Charles Mangin wrote:

 > i have read here before of the reasoning behind netatalk "skipping
 > over" files with long filenames for better support of classic mac
 > clients, thus limiting filenames to be shared to 32 characters (bla
 >  bla 32 bytes bla bla)
 >
 > is there anywhere in the development tree or in the planning for
 > future releases a mechanism to mangle long filenames to 32 chars,
 > similar to what samba does for dos clients (8.3) or what OS X does
 > when working with OS 9 (which should be well documented at apple,
 > but uses some reference to the disk sector the file sits on to
 > ensure unique filenames post-mangling)
 >
 > i'd love if it were an option to be able to turn on or off name
 > mangling vs. name dropping, since some older mc os versions are
 > going to handle things better than newer versions, i suppose.
 >
 > anyhow, i ask because i share a central linux server with macs via
 > netatalk and windows users via samba, and the windows users tend to
 >  name their files very long and descriptive names, just to tick me
 > off.
 >
 >

---

From: Steve Freitas <[email-masked]>
Date: Thu, 15 Nov 2001 21:07:38 -0800

> is there anywhere in the development tree or in the planning for future
> releases a mechanism to mangle long filenames to 32 chars

Hi Charles,

There doesn't seem to be enough manpower to do this yet. It's on the list of
future features, but someone needs to volunteer to code it.

I know a couple of people are working on other future features, but using
GPL code to do it, as they're waiting on a stable GPL release. So in this
case, code could be 'borrowed' from Samba, if it would be helpful.

Steve

---

From: Charles Mangin <[email-masked]>
Date: Fri, 16 Nov 2001 13:44:50 -0500

>case, code could be 'borrowed' from Samba, if it would be helpful.

ah. i figured there was a way to share the code from samba, but it looks to me like your reply is saying that the holdup is a license issue?

netatalk is currently under a BSD license, right? is it migrating towards the GPL? if so, as of what release/revision is that targeted to happen? i'm not a coder by ant stretch, but the licensure issues intrigue me.

---

From: Sebastian Rittau <[email-masked]>
Date: Fri, 16 Nov 2001 23:05:41 +0100

On Fri, Nov 16, 2001 at 01:44:50PM -0500, Charles Mangin wrote:

> netatalk is currently under a BSD license, right? is it migrating towards the GPL?

It is under the GPL.

> if so, as of what release/revision is that targeted to happen?

AFAIR since pre7.

 - Sebastian

---

From: Alistair Riddell <[email-masked]>
Date: Sun, 18 Nov 2001 15:39:00 +0000 (GMT)

> anyhow, i ask because i share a central linux server with macs via netatalk and windows users via samba, and the windows users tend to name their files very long and descriptive names, just to tick…

A simple Perl script could be written to search for files with names over
32 chars, and truncate the names according to an appropriate algorithm
(preserve extension etc.).

You could then run that script manually or from a cron job.

-- 
Alistair Riddell - BOFH
IT Manager, George Watson's College, Edinburgh
Tel: +44 131 446 6070    Fax: +44 131 452 8594
Microsoft - because god hates us

---

From: Thomas Kaiser <[email-masked]>
Date: Sun, 18 Nov 2001 20:51:01 +0100

On Sun, 18 Nov 2001 15:39:00 +0000 (GMT), Alistair Riddell wrote:

>> anyhow, i ask because i share a central linux server with macs via netatalk
>> and windows users via samba, and the windows users tend to name their files
>> very long and descriptive names, just to tick me off.
> 
> A simple Perl script could be written

or modified for your needs from the existing one that is part of the current
netatalk distribution ;-)

<http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/netatalk/netatalk/contrib/sh
ell_utils/>

> to search for files with names over 32 chars,

Hmm... filenames with 32 chars (bytes in fact -- but people don't want to
realize that) will be invisible too. 31 Bytes would be better. But this is
only true on the mac side not on the *NIX side if you don't use codepages as
special characters like umlauts for example will be represented with 3 Bytes
(a colon followed by the hex value of the character in MacRoman encoding)

> and truncate the names according to an appropriate algorithm (preserve
> extension etc.).

...and don't overwrite already existing files with the same name as
'netatalkshorternamelinks.pl' seems to do.

If netatalk will be ready for afp 3.0 some day, afpd has to handle Unicode
names (up to 255 chars), long names (31 bytes as usual with afp 2.x) and
also short names (8.3) for smb-conformance.

(my little knowledge lets me believe this after reading "Catalog Node Names"
in  <http://developer.apple.com/techpubs/macosx/Networking/AFP/AFP3.0.pdf>)

Best regards,

Thomas

---

From: Thomas Schierle <[email-masked]>
Date: Sun, 18 Nov 2001 23:41:54 +0100

> You could then run that script manually or from a cron job.

Eventually some pieces from /contrib/shell_utils/netatalkshorternamelinks.pl
could be used to create such a script.

-- 
Thomas Schierle, Munich, Germany

PGP key [DSS/DH] 0xA23CDA1D available at various public key servers

---

From: Charles Mangin <[email-masked]>
Date: Tue, 20 Nov 2001 11:24:57 -0500

>You could then run that script manually or from a cron job.

that's all well and good, and i see from other messages that there is already such a script out there, but that's just not sufficient in an environment where the netatalk server is being used as the go-between for transferring files between platforms.

what is really ideal would be for a classic mac client to see a name mangled, but an OS X client would see the full name, and the file on the server could remain untouched.

as long as it's on the list of to-do's, i'm happy, and i'll keep my fingers crossed that "transparent long filename mangling" makes its way into a release soon.

---

From: Charles Mangin <[email-masked]>
Date: Tue, 20 Nov 2001 11:24:57 -0500

---

From: Thomas Kaiser <[email-masked]>
Date: Wed, 21 Nov 2001 01:00:57 +0100

am 20.11.2001 17:24 Uhr schrieb Charles Mangin:

> what is really ideal would be for a classic mac client to see a name mangled,
> but an OS X client would see the full name, and the file on the server could
> remain untouched.

That's why this idea found its way into the AFP 3.0 specs already. 'Name
mangling' will be an essential part of an AFP 3.0 compliant fileserver (you
might want to look into the specs -- url has been posted here). But I don't
think there is enough manpower to implement this feature alone instead of as
part of porting AFP 3.0 to netatalk.

Regards,

Thomas