In the scenario below, the app on Windows does not get the updated version of the file, but gets the old version of the file. I have two methods to get the new version in this case: (1) restart the Samba service on the Linux, or (2) call the PowerShell command Remove-SmbMapping on the Windows.
I am not sure if I had experienced this when the SMB server was Windows, but probably not, because I do not remember. If this problem only occurs when the file server is Samba on Linux, which is the cause of the problem? A bug of Samba server? A bug of Windows? Or a problem of the SMB protocol itself?
- Share a directory on a Linux PC using Samba (4.16.2).
- On a Windows PC, open a file on that directory and close the file.
- On the Linux PC, modify the file.
- On the Windows PC, open the file again.