Created attachment 12517 [details] patch 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.
Not clear what this bug about. If delete readonly parameter tells, whether Windows clients can delete files present in samba shares, then this patch does not fixes the Issue. I was not able to delete files present in samba share with option set to no/yes even. It gives this error smbd_smb2_request_error_ex: smbd_smb2_request_error_ex: idx[1] status[NT_STATUS_ACCESS_DENIED] || at ../source3/smbd/smb2_create.c:293 [global] delete readonly = no Even manual pages of smb.conf explains: This parameter allows readonly files to be deleted. This is not normal DOS semantics, but is allowed by UNIX.