The Samba-Bugzilla – Bug 5673
recursed directory created when a served directory has the same name as the share
Last modified: 2009-05-13 05:17:44 UTC
I discovered that when a shared subdirectory has the same name as the share itself, the files in that folder are shared as normal, but then a recursed version of the entire folder winds up inside that directory as well.
So for example:
I had the following share in smb.conf on a server running debian etch with samba 3.0.24
path = /home/pub/music
guest ok = yes
browseable = yes
read only = yes
I mounted that on the fstab of a client running debian sid with samba 3.2
//mercury/music /home/share/music cifs guest,ro,file_mode=0444,dir_mode=0555 0 0
On the client machine /home/share/music/Madonna/Music I discovered that the entire directory tree of the share was in there. Out of curiosity, I navigated to /home/share/music/Madonna/Music/Madonna/Music, and I found only the two files that should have been in there.
This didn't happen before I upgraded from debian etch to sid on the client machine (and with that upgrade upgraded samba from 3.0.24 to 3.2.0). Also, I checked from a windows XP machine, and it did not have the same symptoms. Not a huge deal, since this is on a small home network, and so I'm working around it by renaming the share music-ro, but I can imagine that changing a share name on a larger network might not be so convenient.