on my Windows 7 computer which is connected to samba using SMB2 I
experience a behavior which obviously is correlated to the SMB2
Client Redirector Cache explained by Microsoft in
The problem is, that a specific applicaiton (ArcGIS from ESRI) creates
empty files on the samba share to indicate that specific files are
locked. Because these "lock files" are not visible for ArcGIS
immediately the software complains about not being able to get a
The problem can be solved by setting DirectoryCacheLifetime to ZERO
as mentioned by Microsoft in the article above.
it is said that problems like this are found on Windows Server 2008 R2.
My question is, if anyone knows if this problem is solved in later
releases of Windows Server and if so if it will be solved on samba.
Or if it is a problem resulting from the design of the SMB2 Client
Redirector Cache and could not be solved, in which case for some
applications like my ArcGIS it is necessary to disable some of the
caches listed in the Microsoft article.
It would be great if if anyone could help to answer this question.
*** Bug 10091 has been marked as a duplicate of this bug. ***
So reading that article, this is a fundamental design issue with the directory cache in the SMB2 redirector, that cannot be fixed in Samba.
Essentially the client is caching directory listing data for 10 seconds without the ability for the server to invalidate it. There's nothing we can do about this.
Applications can use directory change notify (which we do support) to receive notifications of directory changes to invalidate this cache - which is why things work when Windows explorer is open on the directory - but unless the application specifically requests this we can't tell the client to invalidate its cache.
The only solution as specified in the article is to disable the cache using the registry entry listed:
"Setting HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Lanmanworkstation\Parameters\DirectoryCacheLifetime (DWORD) to a value of 0 will disable the cache and resolve the file doesn't exist issue."