Modification Time From Sticky Write Time

Eric Pagendarm epagendarm at panzura.com
Thu Jul 11 17:18:39 UTC 2024


Hi Samba Team,

Samba Server Version: 5.15.13 on Ubuntu.

Is the logic related to:
source4/torture/basic/delaywrite.c:test_finfo_after_write()

And related to configuration:
smbd getinfo ask sharemode

Still a requirement in modern environments? Or are there side effects for Windows clients we should be concerned about? We are seeing that some applications find observing new data, without an updated modified time as an issue.

We reproduced it with the steps below using a Linux connection:
---

Steps to Reproduce

1. Setup:
    - Deploy an SMB server on an Ubuntu machine (I've tested on Ubuntu, but I suspect it is reproducible on Windows as well).
    - Expose a share from the SMB server.
    - Mount the share using `cifs` on another Linux machine.

2. Python Script to Reproduce:
    - Use the following Python script to keep the file open and write to it:

    import time

    file_name = "/mnt/<location>/a.txt"
    char_to_write = "a"

    with open(file_name, "a") as file:
        while True:
            file.write(char_to_write)
            file.flush()
            print(".")
            time.sleep(1)


3. Execution:
    - While the above script is running, execute `stat` on the file from the same client or any other client that has the share mounted:

    stat /mnt/<location>/a.txt

    - Observe that even though the file is being written to, its modified time does not get updated.



[Panzura]<https://panzura.com/>
Eric Pagendarm​​​​
Sr Product Architect
408-504-6372<tel:408-504-6372>
[Panzura Introducing Detect and Rescue - Detect Ransomware in as Little as Two Minutes]<https://panzura.com/products/detect-rescue/?utm_source=detect-rescue&utm_medium=email&utm_campaign=email_sig>


-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 17906 bytes
Desc: image001.png
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20240711/0a59f6a2/image001.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image002.png
Type: image/png
Size: 104165 bytes
Desc: image002.png
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20240711/0a59f6a2/image002.png>


More information about the samba-technical mailing list