Non-empty directories can be marked delete on close in CIFS, but not actually deleted
We're affected by an issue where a client is allowed to set the delete on close flag on a directory, but the server will fail to delete the directory without informing the client because it is non-empty at the time of close.
The characteristic message from smbsrv is:
WARNING: File <name> could not be removed, rc=17.
"This DOES appear to be the issue where we allow a
non-empty directory to be marked for deletion on
close, when indeed the delete will fail due to the
directory not being empty."
http://www.nexenta.org/boards/1/topics/1035 has packet traces.
Also as Bugster 6984617 Setting Delete on close on non-empty directory returns success, but directory will not be deleted.
Updated by Electric Monk over 6 years ago
- Status changed from New to Closed
- % Done changed from 0 to 100
commit 5496c1178a1a48006226450b13c2df195831794c Author: Alek Pinchuk <firstname.lastname@example.org> Date: 2015-05-08T14:38:39.000Z 5901 SMB clients get errors trying to delete non-empty directories 1663 Non-empty directories can be marked delete on close in CIFS, but not actually deleted Reviewed by: Bayard Bell <email@example.com> Reviewed by: Gordon Ross <firstname.lastname@example.org> Reviewed by: Kevin Crowe <email@example.com> Approved by: Dan McDonald <firstname.lastname@example.org>