The Samba-Bugzilla – Bug 12300
samba allows deleting readonly file regardless of "delete readonly=no"
Last modified: 2016-09-30 07:16:17 UTC
Created attachment 12517 [details]
It is possible to delete readonly files on samba share regardless of "delete readonly=no" setting, when a windows client uses this API call:
CreateFile(file_path, DELETE, FILE_SHARE_DELETE, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL|FILE_FLAG_DELETE_ON_CLOSE, NULL);
For instance, the windows 10 file explorer uses this method.
The attached patch seems to solve this bug.