Created attachment 15587 [details]
I've stumbled upon another bug most likely related to #14137. It seems that a simple python script like the one below makes samba not to clear the hidden dos attribute of a previously created dot file.
This only happens when the file that is going to overwrite another file has the permission 444 (r--r--r--).
How to reproduce:
1. Mount a Samba 4.11 share using the mount command: mount
2. Run python script:
tmp_dest_fd, tmp_dest_name = tempfile.mkstemp(prefix=b'.file_tmp',
Temporary file created by mkstemp should be renamed to testfile and no longer have the hidden dos attribute.
The mount command is: mount //localhost/share /tmp/share -o username=Administrator