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

Jiri Sasek - Solaris Prague jiri.sasek at oracle.com
Tue Sep 15 12:57:51 UTC 2015


Hi Metze,
Thank you for anothe angle of view...

On 09/15/15 11:47, Stefan Metzmacher wrote:
> Hi Jiri,
>
>> 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.
> 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
> user connection
> to a server).
>
> With SMB1 (the recommended default) for Samba 3.6, one tree connect can
> be shared
> between multiple sessions.
I would like to ask here...   I have expected the user authentication is 
preceding the tree-connect operation   ...so I can not imagine how can 
samba handle 2 sessions (authenticated on different users)  ...or my 
expectation is wrong?


>
> Samba 4.x supports SMB2/3 and which would avoid your specific problem.

...it sounds promising as a business reason to turn update to Samba4 
from "enhancement" to "external customer service request" :-)

Many thanks,
Jiri

>
> As Windows doesn't support something like %U, the setups are not really
> comparable.
>
> 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
> \\samba-server\testshare\%USERNAME%
> 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:
>>
>> Symptoms:
>>
>> 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.
>>
>> Cause:
>>
>> 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.
>
> metze
>




More information about the samba-technical mailing list