[Samba] samba allows rename to a locked file (from linux cifs mount)

Ralph Boehme slow at samba.org
Sat Mar 16 18:26:04 UTC 2024


On 3/16/24 18:18, Michael Tokarev wrote:
> 16.03.2024 20:11, Ralph Boehme wrote:
>> On 3/16/24 14:18, Michael Tokarev wrote:
>>> So I'm trying to go exactly the opposite route: I'm mounting a samba
>>> share on linux (with cifs, see $subject). 
>>
>> ah, missed that. Had read it as if you were acting on the Samba server 
>> directly.
>>
>> This smells like "strict rename" isn't enabled – it isn't by default.
> 
> Nope, it's not it.  strict rename only applies to dirs.
> I'm writing about plain files, not only rename but also delete.
> 
> Enabling strict renames does not change anything.  Yes it prevents from
> renaming a directory if a file is open inside.  But not renaming a plain
> file which is locked.

oh, you mean just rename a plain file that is currently opened by some 
client? That is possible as long as all opens pass FILE_SHARE_DELETE. 
What kind of "lock" where you referring at in your initial mail?

-slow

-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature.asc
Type: application/pgp-signature
Size: 840 bytes
Desc: OpenPGP digital signature
URL: <http://lists.samba.org/pipermail/samba/attachments/20240316/904cc41c/OpenPGP_signature.sig>


More information about the samba mailing list