The Samba-Bugzilla – Bug 8379
Enabling SMB2 causes file operations to fail
Last modified: 2013-08-29 08:08:43 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:
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
comment = Network Logon Service
path = /home/samba/netlogon
guest ok = Yes
browseable = No
read only = Yes
comment = Public Files
path = /home/samba/public
strict allocate = yes
read only = No
create mask = 0777
directory mask = 0777
vfs objects = readahead
comment = Home Directories
path = /home/samba/homes/%S
strict allocate = yes
read only = No
create mask = 0700
browseable = No
valid users = %S
Created attachment 7349 [details]
Attempts to open 'application.ini'
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.
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 ?
(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 ?
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)?
Yes, port 445 should do it.
Created attachment 7356 [details]
This Wireshark Capture File does contain 3 attempts to open the file
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.
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).
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.
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.
(In reply to comment #6)
> Created attachment 7356 [details]
> Wireshark Capture
> This Wireshark Capture File does contain 3 attempts to open the file
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.
(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.
thanks, Volker, I resolve this as a dup.
*** This bug has been marked as a duplicate of bug 10106 ***