Bug 2508 - Samba Shares list phantom directories and files
Samba Shares list phantom directories and files
Status: CLOSED FIXED
Product: Samba 3.0
Classification: Unclassified
Component: smbclient
3.0.9
x86 other
: P3 critical
: none
Assigned To: Samba Bugzilla Account
Samba QA Contact
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2005-03-21 20:28 UTC by Mark Condic
Modified: 2005-08-24 10:17 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Condic 2005-03-21 20:28:23 UTC
Using the latest build, 3.0.12-2.1 (3.0.10 and 3.0.11 also) of Samba.

If I boot from a MS-DOS, FreeDOS, Erwin's Network BootDisk (or from 
UltimateBOOT CD)using FreeDOS image, and then use the command:

net use z:\\servername\sharename
z:
dir/p

The phantom directories are always truncated to six character~another character.

This happens every time, on two different SuSE 9.2 machines.

Here is a directory listing:
Volume in drive Z is public

Directory of Z:\

L2I81E~A             <DIR>  11-16-04  7:08p
argus                <DIR>  11-16-04  9:12p
T3AIIZ~7             <DIR>  03-14-05 12:49p
boots                <DIR>  02-19-05 11:05p
download             <DIR>  03-13-05 11:17p
LL02V8~9             <DIR>  11-20-04  2:01a
M5Q5WZ~Y             <DIR>  11-19-04  7:58p
N9R031~7             <DIR>  02-05-05  5:45p
SH2RGS~Q             <DIR>  01-03-05 12:57a
S5Z00U~C             <DIR>  02-26-05  3:16p
LIST     TXT         2,349  03-21-05  9:04p
         3 file(s)    171,262,696 bytes
        49 dir(s)      2,047 Mega bytes free
argus, boots, download and LIST.TXT are correct, all the others are not.

Notice the dates are different.  There are some files that appear to be 
correct, but deleted but not from this drive.  If I use XtreeGold, I only see 
phantom directories, none of the real directories.  Some files appear to be 
duplicates of other files on the samba share.  I can read them, but obviously 
don't want to delete them.  Here is ms-dos directory listing of subdirectories:

 Directory of Z:\L8WMID~U\EUDORA

.                    <DIR>  11-20-04  1:57a
..                   <DIR>  11-20-04  1:57a
02281               41,885  03-07-01 10:24p
03061               30,139  03-07-01 10:05p
eudora   ini         9,196  01-16-04  5:12p
eudora   log       119,772  12-08-03 12:50a
old      mbx     2,209,946  12-08-03 12:49a
old      toc        23,212  12-08-03 12:50a
owner    lok             0  01-15-04 12:30a
         7 file(s)      2,434,150 bytes
         2 dir(s)      2,047 Mega bytes free

Again, XP and Windows don't see these directories.

Please let me know if I can help in any way.

Thanks in advance for any help or bug fixes.  Here is my smb.conf:

[global]
        workgroup = Take5
        os level = 2
        kernel oplocks = false
        guest only = yes
        security = user
        encrypt passwords = Yes
        map to guest = Bad User
;       username map = /etc/samba/smbusers
;       encrypt passwords = yes
        socket options = SO_KEEPALIVE IPTOS_LOWDELAY TCP_NODELAY
        local master = No
        wins support = No
[public]
        comment = Linux166
        path = /tmp2/tempspace
        create mask = 0777
        create mode = 0777
        directory mask = 0777
        read only = no
        public = yes
        writable = yes
Comment 1 Jeremy Allison 2005-03-21 21:10:00 UTC
These look like perfectly normal hash2 mangled names to me. DOS only supports
short names, Samba uses the hash2 algorithm to generate unique 8.3 names from the
actual directory names on the server.
What does the directory look like on the server ? What does an ls -l show ?
Can you upload a debug level 10 log. This doesn't look like a bug to me.
Jeremy.
Comment 2 Mark Condic 2005-03-21 21:17:10 UTC
The samba share has over 53,000 files (and directories) incase this information 
is important.  All of these directories are in the MS-DOS list, I just cut out 
the good one for brevity.

Here is the ls -l:

linux166:/tmp2 # ls -l
total 167636
drwxrwxrwx   51 root   root        4096 Mar 21 21:50 .
drwxr-xr-x   24 root   root        4096 Mar 21 19:36 ..
drwxrwxrwx    4 nobody nobody      4096 Nov 20 02:01 Lsca Instructions
drwxrwxrwx   21 nobody nobody      4096 Mar 14 18:20 My Picture Events
drwxrwxrwx   49 nobody nobody      4096 Jan  2 19:57 My Pictures
drwxrwxrwx    6 nobody nobody      4096 Mar 21 22:07 Samsung650
drwxrwxrwx    3 nobody nobody      4096 Nov 16 21:12 argus
drwxrwxrwx    9 nobody nobody      4096 Feb 20 19:03 barts6
drwxrwxrwx   17 nobody nobody      4096 Mar 10 10:57 bartsbt
drwxrwxrwx    3 nobody nobody      4096 Dec  9 15:51 bkmark
drwxrwxrwx    3 nobody nobody      4096 Feb 19 23:05 boots
drwxrwxrwx    2 nobody nobody      4096 Nov 16 22:19 cdclone
-rwxrw-rw-    1 nobody nobody     14779 Mar  5 01:00 cdrom.bat
drwxrwxrwx    5 nobody nobody      4096 Jan 31 18:18 corens
drwxrwxrwx    6 nobody nobody      4096 Nov 18 18:37 dans
drwxrwxrwx  348 nobody nobody      8192 Mar 21 22:09 download
drwxrwxrwx    2 nobody nobody      4096 Nov 20 01:55 fonts
drwxrwxrwx   26 nobody nobody      4096 Nov 19 08:28 ghost
drwxrwxrwx   31 nobody nobody      4096 Nov 19 15:43 internet
drwxrwxrwx    2 nobody nobody      4096 Nov 20 01:52 isoimages
drwxrwxrwx    2 nobody nobody      4096 Nov 20 01:57 key skills
drwxrwxrwx   26 nobody nobody      4096 Dec 10 14:00 linux
drwxrwxrwx   11 nobody nobody      4096 Mar 21 20:25 linux92
drwxrwxrwx    4 nobody nobody      4096 Nov 20 01:57 lorraines
drwxrwxrwx    2 root   root       16384 Nov 16 19:08 lost+found
drwxrwxrwx    2 nobody nobody      4096 Nov 20 02:01 mcafee
drwxrwxrwx    2 nobody nobody      4096 Nov 26 13:15 media
drwxrwxrwx    4 nobody nobody      4096 Nov 20 01:54 micrograms
drwxrwxrwx   16 nobody nobody      4096 Nov 26 13:16 million
drwxrwxrwx    2 nobody nobody      4096 Nov 20 02:01 mp3
drwxrwxrwx    2 nobody nobody      4096 Dec  7 09:14 msdos
drwxrwxrwx    3 nobody nobody      4096 Nov 23 14:52 my movies
drwxrwxrwx   15 nobody nobody      4096 Nov 19 19:58 my music
drwxrwxrwx    3 nobody nobody      4096 Nov 20 01:54 my_school_cclub
drwxrwxrwx    3 nobody nobody      4096 Nov 20 02:02 my_school_documents
drwxrwxrwx    2 nobody nobody      4096 Nov 26 13:16 ncdtree
drwxrwxrwx    4 nobody nobody      4096 Feb  5 17:45 netboot52
drwxrwxrwx    2 nobody nobody      4096 Nov 20 01:48 nu
drwxrwxrwx    2 nobody nobody      4096 Nov 23 09:57 rpms
drwxrwxrwx   12 nobody nobody      4096 Mar 13 14:12 sarah
drwxrwxrwx    3 nobody nobody      4096 Dec 15 14:17 school
drwxrwxrwx    8 nobody nobody      4096 Nov 22 08:35 shared
drwxrwxrwx    4 nobody nobody      4096 Nov 20 02:00 sonic
drwxrwxrwx    4 nobody nobody      4096 Nov 20 02:03 sr.pat
drwxrwxrwx    5 nobody nobody      4096 Jan  3 00:57 suse92dvd
drwxrwxrwx    9 nobody nobody      4096 Feb 20 19:16 tbarts6
drwxrwxrwx    7 nobody nobody      4096 Mar  7 20:12 temp
drwxrwxrwx    2 nobody nobody      4096 Nov 20 01:59 temp2
drwxrwxrwx    3 nobody nobody      4096 Mar 14 12:49 tempspace
drwxrwxrwx   14 nobody nobody      4096 Mar 11 09:51 ubcd
-rwxrw-rw-    1 nobody nobody 171245568 Mar 13 17:37 ubcd.iso
drwxrwxrwx   17 nobody nobody      4096 Jan 12 12:32 webpages
drwxrwxrwx    2 nobody nobody      4096 Nov 20 01:59 xppro

Comment 3 Jeremy Allison 2005-03-21 21:30:20 UTC
You're giving me a truncated list and asking me to guess which directories the
mangled ones correspond to ? That's not a good problem solving technique. Don't
filter the information with stuff "you don't think is relevent". How do we know
what you're missing out ?
I need to see a full debug level 10, plus a proper list from the DOS client and
an ls -l of the same directory before I spend any more time on this.
Jeremy.
Comment 4 Mark Condic 2005-03-21 21:38:48 UTC
After a line by line review of the directories, I have 14 directories that are 
longer than 8 characters, and 14 directories that look strange but are hashed. 
(I guess I was not as careful as I thought.)  I am so sorry that I reported 
this as a bug.  Is there a way to get samba to truncate the same was as MS-DOS? 
example:  Micrograms --> Microg~1  ?  At least then I would have a chance of 
figuring out what directories are which.  Thanks for your help. (I will skip 
sending the large level 10 logs). 
Comment 5 Jeremy Allison 2005-03-22 00:14:12 UTC
For a closer hashing mechanism to DOS, use the old hash methond
instead of the default hash2. hash2 gives much better collision
properties but hash looks more like the old DOS method.
Jeremy.
Comment 6 Gerald (Jerry) Carter 2005-08-24 10:17:04 UTC
sorry for the same, cleaning up the database to prevent unecessary reopens of bugs.