samba, rsync --backup, and mangled instead of long filenames

Polytropon freebsd at
Fri Jun 20 05:59:17 UTC 2014

On Fri, 20 Jun 2014 00:20:06 -0500, Andrew Berg wrote:
> On 2014.06.19 23:44, Polytropon wrote:
> > On Thu, 19 Jun 2014 20:12:54 -0500, Noel wrote:
> >> Yes, the colons will break windows compatibility.
> > 
> > And make sure file names aren't too long, because long file names
> > are also not accepted in the "Windows" land of non-compatibility
> > and non-interoperability. ;-)
> To be fair, this is more of an application issue than Windows itself
> since Windows does provide an API for long file names, and
> applications that use it can work with long file names just fine.

It's _often_ an application problem when the native APIs aren't
being used properly. As you usually don't get source code with
"Windows" programs, you can't be fully sure, that's why it makes
sense to avoid the expectation that things which work everywhere
do also work on "Windows". If I remember correctly, the maximum
length is 260 bytes (and in case of UTF-8 representation, this
could mean less characters) for the _full_ path, whereas for
example UFS restricts each _element_ of the path (and the file
name) to 256 bytes.

There are also "forbidden strings" like CON, PRN, CLOCK$, NUL
(even with extensions), as well as for example $Boot, $Secure,
or $Quota. If you expect those (in other places fully valid)
file names to work, well, ... ;-)

Not allowing damage to happen out of expectations is an important
consideration when backing up files from FreeBSD to "Windows".
Some careful precautions can help here, even though it might make
the whole process "less convenient". But if you value your data,
you usually don't care much for convenience. Avoiding obstacles
before they can hit you seems to be helpful. :-)

Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...

More information about the freebsd-questions mailing list