Samba inode faking breaks fileutils (and may corrupt the filesystem)

Tim Van Holder tim.vanholder at falconsoft.be
Tue Oct 17 13:08:06 GMT 2000


[This is an email copy of a Usenet post to "comp.os.linux"]

When testing a 'rename-files-to-lowercase-names' script, I ran into the
followin problem on an NT share mounted through samba on my RH6.2 Linux
system:

cd /mnt/nt-share mv fOO foo
[no response - killed through Ctrl-C]

as a result, I ended up with a structure like this:
/mnt/nt-share/fOO/fOO/fOO/fOO/fOO/fOO/fOO/fOO/fOO/fOO/...

It seems mv happily moves the directory into itself. This directory tree
is nested so deeply even that NT is unable to access or even delete it, so
it effectively becomes immortal.

The problem seems to be with samba's inode number faking, as it generates
a new fake inode if a directory entry is referred to by a different name
(eg a directory entry foo will have gotten inode number 1234, but if it's
accessed as FOO, it gets a new inode generated for it). This breaks
fileutils, as they use the inode number to detect identical files.

Versions in use:
RedHat Linux 6.2, with kernel 2.2.16-3
fileutils-4.0-21
samba-2.0.7-4

--
Tim Van Holder - Falcon Software NV
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Fight spam - go to http://www.politik-digital.de/spam/




More information about the samba mailing list