When a file is open and being written to by a client, executing the stat command on this file (by the same or a different client) results in the modified time reported by stat remaining unchanged from when the file was first opened. This could potentially be a bug or an intentional behavior, and further insights are needed to understand the cause. Steps to Reproduce: Setup: - Deploy an SMB server on an Ubuntu machine (this issue has been observed on Ubuntu but may also be reproducible on Windows). - Expose a share from the SMB server. - Mount the share using cifs on another Linux machine. - 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) - 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.