Bug 12300 - samba allows deleting readonly file regardless of "delete readonly=no"
Summary: samba allows deleting readonly file regardless of "delete readonly=no"
Status: NEW
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: File services (show other bugs)
Version: unspecified
Hardware: All All
: P5 major (vote)
Target Milestone: ---
Assignee: Samba QA Contact
QA Contact: Samba QA Contact
Depends on:
Reported: 2016-09-30 05:42 UTC by Petr Klikorka
Modified: 2017-03-27 10:26 UTC (History)
2 users (show)

See Also:

patch (465 bytes, patch)
2016-09-30 05:42 UTC, Petr Klikorka
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Petr Klikorka 2016-09-30 05:42:47 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:


For instance, the windows 10 file explorer uses this method.

The attached patch seems to solve this bug.
Comment 1 Amit Kumar 2017-03-27 10:26:13 UTC
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

 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.