Bug 8379 - Enabling SMB2 causes file operations to fail
Enabling SMB2 causes file operations to fail
Status: RESOLVED DUPLICATE of bug 10106
Product: Samba 4.0
Classification: Unclassified
Component: File services
4.0.9
All Windows 7
: P5 critical
: ---
Assigned To: Samba QA Contact
Samba QA Contact
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-08-16 13:57 UTC by mark.a.reidenbach
Modified: 2013-08-29 08:08 UTC (History)
2 users (show)

See Also:


Attachments
Attempts to open 'application.ini' (107.50 KB, application/x-gzip)
2012-02-26 22:35 UTC, peter.schaefer
no flags Details
Wireshark Capture (387.47 KB, application/octet-stream)
2012-03-03 13:27 UTC, peter.schaefer
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description mark.a.reidenbach 2011-08-16 13:57:58 UTC
When setting max protocol = SMB2 I experienced the following problems:

[homes] Trying to open a html file in notepad fails on Windows7 Pro SP1.  Opening it in Firefox (default browser) or Open Office works ok.

[homes] Mozilla Thunderbird running with a profile on the samba share insists on downloading all the IMAP messages each time it is launched on Vista Pro SP2.  Thunderbird only downloads new messages when SMB2 is removed from the samba config.

[public] Copying files from the local computer or a USB key to samba works, but Firefox and Chrome are unable to save files to the samba shares.  They download files ok (e.g. file.part) but seem to be unable to rename the file when the download is complete.

[public] Installing programs from samba seems to mostly work.  However, installing Itunes 10.4 for 64 bit windows 7 seemed to work but the Apple Software Update program was not installed (uninstalling, copying iTunes64Setup.exe to the desktop, and running the setup program again installed the Update program).

I did not see any obvious errors in the samba error log at log level 3.

My smb.conf is the following:
[global]
        domain logons = Yes
        domain master = Yes
        preferred master = Yes
        workgroup = SYNERGY

        netbios name = SERVER
        server string = Office Samba Server
        passdb backend = tdbsam
        encrypt passwords = yes

        min protocol = NT1
        max protocol = SMB2

        server schannel = yes
        server signing = mandatory
        lanman auth = No
        ntlm auth = No
        lm announce = No

        client schannel = yes
        client signing = auto
        client ntlmv2 auth = Yes
        client lanman auth = No
        client plaintext auth = No
        client use spnego = No
        client use spnego principal = No

        directory name cache size = 500

        name resolve order = host wins bcast
        add machine script = /usr/sbin/useradd -d /dev/null -g 100 -s
/bin/false -M %u
        logon script = logon.cmd
        logon drive = z:
        logon path =
        logon home = \\server\%U
        dns proxy = No
        wins support = Yes
        time server = Yes
        ldap ssl = no

        log file = /var/log/samba/%m.log
        log level = 3

        bind interfaces only = yes
        interfaces = 192.168.13.150/24 127.0.0.1
        smb ports = 445

        # Some defaults to prevent access problems when upgrading (i.e
3.0.23 -> 3.0.24 -> 3.0.25)
        host msdfs = yes
        msdfs root = yes

        kernel change notify = yes
        use sendfile = yes

        # allow enumeration of winbind users and groups
        winbind enum users = yes
        winbind enum groups = yes
        template shell = /bin/bash

        lock directory = /var/lib/samba

        # Samba 3.6 changes
        idmap config * : backend = tdb2
        idmap config * : range = 1000-20000

[netlogon]
        comment = Network Logon Service
        path = /home/samba/netlogon
        guest ok = Yes
        browseable = No
        read only = Yes

[public]
        comment = Public Files
        path = /home/samba/public
        strict allocate = yes
        read only = No
        create mask = 0777
        directory mask = 0777
        vfs objects = readahead

[homes]
        comment = Home Directories
        path = /home/samba/homes/%S
        strict allocate = yes
        read only = No
        create mask = 0700
        browseable = No
        valid users = %S
Comment 1 peter.schaefer 2012-02-26 22:35:15 UTC
Created attachment 7349 [details]
Attempts to open 'application.ini'
Comment 2 peter.schaefer 2012-02-26 22:35:41 UTC
Well, i'm also experiencing a strange error with Samba 3.6.3, SMB2, Windows7 and the home share. 

I've put the Mozilla Thunderbird profile folder on the home share and Thunderbird Add-Ons stopped working when I switched to SMB2. Investigating, i found that i cannot open e.g. the file "application.ini" in the extension folder with e.g. notepad. The server responds with an error message (in german) that i would translate like "The server cannot complete the request". However, the file could be copied without issue to a local drive. So i guess some issues with file locking.

I've attached a log file that i recorded during the trials but i didn't see obvious errors in there.

Regards,
  Peter
Comment 3 Jeremy Allison 2012-02-29 19:13:17 UTC
I'm sorry but I don't see any error messages at all in the log file you posted. Do you know what error message is being sent on the wire ?

Jeremy.
Comment 4 peter.schaefer 2012-03-02 07:27:26 UTC
(In reply to comment #3)
> I'm sorry but I don't see any error messages at all in the log file you posted.
> Do you know what error message is being sent on the wire ?

Unfortunately, no. 

But since the error is easy to reproduce i could try another one or even record something with wireshark. 

Which Samba loglevel is sensible? Which TCP/UDP-ports should i record (i guess it's 445)?
Comment 5 Jeremy Allison 2012-03-02 17:43:33 UTC
Yes, port 445 should do it.
Comment 6 peter.schaefer 2012-03-03 13:27:42 UTC
Created attachment 7356 [details]
Wireshark Capture

This Wireshark Capture File does contain 3 attempts to open the file 

U:\thunderbird\default\extensions\{e2fda1a4-762b-4020-b5ad-a41df1933103}\application.ini 

with notepad. U: is a [home] share. All attempts to read the file on the share failed with the German error message "Der angegebene Server kann den angeforderten Vorgang nicht ausführen" (i.e "The given server cannot execute the requested action").

The last action i did was copying the file to the local harddisk, which succeeded.

The server in question had "smb port = 139" set when captured the packets (but it fails without that setting, too). It's an AMD64 machine running Debian Squeeze with the package from backports.debian.org that i compiled myself (since the amd64 package in bpo currently fails to build due to debhelper problems). So, if still no error can be seen in the logs, *maybe* we better wait for 'officially compiled' packages before trying again.

HTH, let me know if more information is needed.

Regards,
 Peter
Comment 7 peter.schaefer 2012-03-11 12:24:29 UTC
Short update: Bug happens with the samba package from debian squeeze-backports (3.6.3-1~bpo60+2), too. 

Regarding the source code this package is pretty much unchanged from upstream (patches are @ http://backports.debian.org/debian-backports/pool/main/s/samba/samba_3.6.3-1~bpo60+2.debian.tar.gz).
Comment 8 Björn Jacke 2012-09-10 13:44:49 UTC
very likely the issues you describe here have been fixed in the meantime. If you still see issued with smb2 in the latest 3.6 release, plrease report them back.
Comment 9 Björn Jacke 2013-08-21 13:56:25 UTC
reopeing this as I also see the same error with 4.0.9 and smb2 on a w2k8r2 client. on a win7 client it works.
Comment 10 Volker Lendecke 2013-08-28 09:33:48 UTC
(In reply to comment #6)
> Created attachment 7356 [details]
> Wireshark Capture
> 
> This Wireshark Capture File does contain 3 attempts to open the file 
> 
> U:\thunderbird\default\extensions\{e2fda1a4-762b-4020-b5ad-a41df1933103}\application.ini 

Took a fresh look at the trace: The client makes calls that cause Samba to send an invalid result like the one in Bug 10106. So I'm inclined to call this a duplicate. I have sent out patches for review to samba-technical that will fix this. After those patches have been accepted I will upload them to 10106.
Comment 11 Volker Lendecke 2013-08-28 09:34:32 UTC
(In reply to comment #10)
> Took a fresh look at the trace: The client makes calls that cause Samba to send
> an invalid result like the one in Bug 10106. So I'm inclined to call this a
> duplicate. I have sent out patches for review to samba-technical that will fix
> this. After those patches have been accepted I will upload them to 10106.

Forgot to mention: Frame 1183 is one example of such an invalid return.
Comment 12 Björn Jacke 2013-08-29 08:08:43 UTC
thanks, Volker, I resolve this as a dup.

*** This bug has been marked as a duplicate of bug 10106 ***