Two client sessions running on w2k8 server in WTS (rdesktop) - MS Office locking issue
metze at samba.org
Tue Sep 15 09:47:52 UTC 2015
> I have the following issue:
> 1) Windows 2008R2 Terminal server with 2 users: userA and userB
> 2) Samba 3.6.x File server sharing the following share:
> 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
> userB connects his F: drive to \\samba-server\testshare (which points to
> 3) UserA creates a Microsoft Word document on testshare with name
> 1234.docx, saves, exits and opens the file again The file is
> 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
> 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.
Windows 2008R2 offers SMB2 to the client, where a tree connect (a logical
connection to a share) always belongs to a single session (a logical
to a server).
With SMB1 (the recommended default) for Samba 3.6, one tree connect can
between multiple sessions.
Samba 4.x supports SMB2/3 and which would avoid your specific problem.
As Windows doesn't support something like %U, the setups are not really
Also Windows clients use the full unc as key to a SMB > 2.1 Lease Key,
using %U in the path would disable caching based on leases in your case.
It might be better to use something like
on the client and let the client expand the variable part of the path.
> It also works fine if the clients runs on Win desktops i.e. in
> VirtualBox even if those are over the virtual NAT so those are visible
> as one IP
> ...I have also find in knowledge base:
> Samba clients using Windows 2008 Terminal Server is slow accessing smb
> shares on Solaris Samba.
> The performance issue becomes worse over time as more clients are using
> the share.
> This is a Microsoft limitation that it only creates one TCP session for
> all terminal server users when using SMB1 Protocol
> Windows 2008 Terminal Server does not open one TCP session per user to
> SMB1 Protocol fileservers.
> This behavior is by design. All users are using one SMB session to samba
> server which causes a bottleneck.
> Solution: Implement SMB2 Protocol
Yes, use a newer Samba version.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 198 bytes
Desc: OpenPGP digital signature
More information about the samba-technical