The Samba-Bugzilla – Bug 3216
Deleting of folders doesn't work (they reappear after a refresh)
Last modified: 2005-11-03 11:31:08 UTC
I recently discovered that I cannot delete folders using Windows anymore.
Actually, the folder _seems_ to be correctly deleted if done with Windows
Explorer (i.e. it is removed from the list), but it reappears after a refresh
(using the F5 key).
Only directories are affected, i.e. I can remove all plain files without problems.
Tried this with Windows XP Pro SP1 and SP2 (one without any patches and another
with all but the most recent updates of Oct. 2005) installations.
Please note that everything works using smbclient connecting to with the same
share with identical user and password, i.e. rmdir succeeds and the folder
is gone, as well as a rmdir as the same user natively under Linux.
Also, very interesting: Using cygwin, a 'cd //server/share && mkdir foo && rmdir
foo' fails with rmdir: 'foo': Directory not empty.
Unfortunately, I do not know for sure when this bug was introducted. I _think_
everything worked with 3.0.20a because it is unlikely that that I just did not
Speaking of versions: I'm running Samba-3.0.20b under SuSE 9.3 with a self-built
vanilla 18.104.22.168 kernel. Samba was installed using the binary (please don't stop
reading here!) packages from:
WAIT! Because the binary package did not work, I recompiled the samba-3.0.20b
tarball from samba.org using the configure options ripped from the SuSE
./configure --prefix=/usr --sbindir=/usr/sbin --localstatedir=/var/lib/samba
--sysconfdir=/etc/samba --with-configdir=/etc/samba --with-libdir=/usr/lib/samba
--with-mandir=/usr/share/man --enable-cups --with-acl-support --with-automount
--with-msdfs --with-pam --with-pam_smbpass --with-piddir=/var/run/samba
--with-privatedir=/etc/samba --with-quotas --with-smbmount
--with-swatdir=/usr/share/samba/swat --with-syslog --with-tdbsam --with-utmp
--with-vfs --with-winbind --with-shared-modules=idmap_rid,idmap_ad
--with-expsam=xml,mysql,pgsql --with-python --with-fake-kaserver=auto && make &&
Unfortunately the bug remained and that's why I'm creating this bug entry
rather than contacting SuSE.
FYI, I cannot recall any changes in my Samba configuration that would
justify such odd behaviour. Moreover, I'm using the shares for quite some
time now (say, since Samba 2.0.x) and they always worked.
My Samba configuration:
security = user
client NTLMv2 auth = Yes
client lanman auth = No
client plaintext auth = No
null passwords = Yes
guest account = smbguest
username map = /etc/samba/smbusers
log level = 5
syslog = 0
log file = /var/log/samba/%m.log
max log size = 25000
name resolve order = hosts wins lmhosts bcast
time server = Yes
os level = 65
lm announce = No
preferred master = No
domain master = No
wins proxy = No
wins server = 192.168.77.250
create mask = 0740
directory mask = 0750
max connections = 100
hide special files = Yes
dont descend = /proc,/dev,/root,/etc
comment = Test Directory
path = /home/walter/testdir
valid users = walter, root
force user = walter
read only = No
create mask = 0750
hosts allow = 192.168.
hide dot files = No
A level 10 logfile is available from:
It contains the creation of folder 'foo1' and the failed attempt
of deleting it.
If you need any other information to trace this problem, I'd be happy to supply!
*** Bug 3213 has been marked as a duplicate of this bug. ***
I am attaching an ethereal packet trace of the transaction when attempting to
rmdir an empty directory in a cygwin shell.
Created attachment 1540 [details]
This is the packet trace during an attempted rmdir of an empty directory when
using a cygwin shell.
Ok, I know what this is. Cygwin is using a set of the delete on close flag of an
empty directory to remove an empty directory. This doesn't work with the new
I'll fix it.
Created attachment 1547 [details]
Patch against 3.0.20b
Try this patch against 3.0.20b - it's equivalent to what is going into 3.0.21
to fix this. Please let me know if this fixes the problem.
I recompiled the SuSE 3.0.20b source RPMs with the patch applied.
Can delete empty directorys from Cygwin _and_ Windows Explorer.
One question, though:
If this is a Cygwin "bug", then why is the Windows Explorer affected too?
Anyways, worksforme now but I think the bug can be resolved as fixed now.
we had the same problem when we delete folders using windows explorer. Now with
the patch applied everything is ok.
Thanks for the patch,
Jeremy, can this bug be resolved as FIXED now?
Bug is now fixed.