Two client sessions running on w2k8 server in WTS (rdesktop) - MS Office locking issue

Jeremy Allison jra at
Tue Sep 15 00:05:37 UTC 2015

On Mon, Sep 14, 2015 at 11:45:22PM +0200, Jiri Sasek - Solaris Prague wrote:
> Hi community members,
> I have the following issue:
> Scenario:
> 1) Windows 2008R2 Terminal server with 2 users: userA and userB
> 2) Samba 3.6.x File server sharing the following share:
> ...
> [testshare]
>    comment = A test share
>    path = /export/testshare/%U
>    writable = yes
>    printable = no
>    create mask = 0765
> ...
> userA connects his F: drive to \\samba-server\testshare (which points to
> /export/testshare/userA)
> userB connects his F: drive to \\samba-server\testshare (which points to
> /export/testshare/userB)
> 3) UserA creates a Microsoft Word document on testshare with name 1234.docx,
> saves, exits and opens the file again The file is
> /export/testshare/userA/1234.docx
> 4) UserB opens a file with the same name on testshare:
> /export/testshare/userB/1234.docx, but gets the following message:
> 'This action can't be completed because the file is open in another program'
> This should not happen as both files are on different directories and have
> different inode numbers.
> Note this happens only when using Windows Terminal server. It is know that
> Windows Terminal server opens 1 smb connection per share,hence userA and
> userB share the same connection and smbd daemon.
> When the same is done on a Windows 2008R2 fileserver, this works without a
> problem.

Hi Jiri, this is a known (to me, at least :-) problem
with the Windows client local buffer cache.

It indexes remote files by *pathname*, not inode
number. So \\server\testshare\file.docx will be
seen as identical by the Windows client, even if
the remote server is serving out different files
due to dynamic share paths (a %U in the underlying
share path definition).

If you look on the wire you'll see that the
"file is open in another program" error isn't
coming from the Samba server, but being locally
generated on the client.

The reason you don't see this on a Windows
fileserver is you can't have two identical
pathnames for the same user pointing to different



More information about the samba-technical mailing list