TRANS.TBL files on Win95 fileserver

Philippe Verdy verdy_p at wanadoo.fr
Mon May 18 00:26:14 GMT 1998


brihall at pcisys.net wrote on Sat, 16 May 1998 15:41:44 -0600 (MDT):
>I have a small LAN in my basement, with my PC running RH5 Linux and a Win95
PC
>connected by Samba. Everything works fine, but when I smbmount a CD (burned
>with xcdroast) from the Linux box (CD is in the Win95 machine) I do not get
the
>proper filenames. All files are uppercase, and the TRANS.TBL files appear
to be
>ignored. I have tried playing with name mangling, but it didn't help. Is
this a
>Samba deficiency, or is it something I've configured wrong?

The TRANS.TBL file on CDROM's is only used by Linux CDFS file-system.
Because SMBFS is not CDFS, it simply ignores it (SMB mounted filesystems
cannot make the difference between remote-filesystems).
And because Win95 handles the TRANS.TBL as a regular file, it shows it to
its sharing partners as if it was a regular file. So Linux SMBFS cannot make
the difference: you can create on Linux a TRANS.TBL file on your Linux
file-system, and it will legitimately be ignored.
SMBFS does not know whever a TRANS.TBL file from a remote share comes from a
CDROM or from another filesystem, should it be Win95 or a Linux SAMBA share
on a remote hard-disk filesystem !

Win95 is not wrong: TRANS.TBL is ignored because it is a Linux-specific
extension of its CDFS.
SMBFS on Linux is not wrong: there is no information from the remote SMB
share that indicates it is a CDROM.
And because CDROM's use the ISO9660 file-system, the short name of ISO9660
files legitimately appear in uppercase.

In fact that is Linux-CDFS that is wrong: the ISO9660 provided a standard
storage format for both short and long-filenames.
Short names are always supported, but long names are optionnal on CDROM.
CDROM's made for Linux should have used the long-filenames on their master
storage, but long filenames on ISO9660 volumes are simply ignored by Linux
CDFS, which tries to find instead a TRANS.TBL file within the container
directory. So don't blame Samba!

However, an option to SMBFS mounted shares should allow to specify whever
special handling of TRANS.TBL files should be done. In that case, browsing a
CDROM share will be slower: before displaying a directory content, SMBFS
should have to browse the whole directory to search for the presence of a
TRANS.TBL file, or SMBFS should search this file explictly by name and cache
its contents for long filenames generation before browsing the remote shared
directory. And there is no way for SMBFS to determine this option
automatically.

You could argue that SMBFS could search that file on all browsed
directories, but remember: a SMB share also has provisions for file
creation, file renaming, etc... Imagine that you transmit to the remote
share a "remove *.TBL" command. What will the remote filesystem do ? will it
destroy a legitimate TRANS.TBL file ? In that case, what will become long
filenames if SMBFS has to search for a file it has purged from its caches ?
You may also expect that only only read-only mounted shares should handle
the TRANS.TBL file. But you could also imagine other solutions. So the best
solution should be a mount option for CDROM's for SMBFS like:
    mount -t smbfs -o ro,cdfs '\\server\share' /mountpoint
But this involves a modification to the SMBFS source to provide management
of the 'cdfs' mount option, plus addition of the TRANS.TBL file content
caching when found.





More information about the samba mailing list