Bug 10592 - OSX 10.9.2, samba 4.1.6-Ubuntu vs Microsoft Office 2011 and Read-Only files
Summary: OSX 10.9.2, samba 4.1.6-Ubuntu vs Microsoft Office 2011 and Read-Only files
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: File services (show other bugs)
Version: 4.1.6
Hardware: x64 Linux
: P5 major (vote)
Target Milestone: ---
Assignee: Ralph Böhme
QA Contact: Samba QA Contact
Depends on:
Reported: 2014-05-06 04:55 UTC by tanner
Modified: 2020-04-08 09:40 UTC (History)
6 users (show)

See Also:

server logs and tcpdump capture traces. (968.00 KB, application/x-gzip)
2014-05-06 04:55 UTC, tanner
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description tanner 2014-05-06 04:55:45 UTC
Created attachment 9905 [details]
server logs and tcpdump capture traces.

Initial documented on the mailing list at  https://lists.samba.org/archive/samba/2014-May/181078.html

Upgraded from samba 3.6.20 on gentoo to samba 4.1.6 on Ubuntu Trusty.  Since the upgrade all attempts to open Microsoft Office files results in the file being opened Read-Only. Found multiple posts from multiple sites dealing with similar problems.





But none of the solutions or work-arounds fixed the problem.  

Other files open fine. Just Microsoft Office files open Read-Only.

Any recommendations?

Here's my configuration.

    netbios aliases = staff
    workgroup = STAFFERS
    local master = yes
    domain master = yes
    preferred master = yes
    os level = 31
    server string = testing
    security = user
    encrypt passwords = true
    obey pam restrictions = yes

    syslog = 0
    log file = /var/log/samba/%m.log
    max log size = 0

    max xmit = 16384

    # NO roaming profiles http://melecio.org/node/5
    logon path =
    logon home =
    logon script = %U.bat

    template shell = /bin/bash
    template homedir = /home/%D/%U

    client use spnego = yes
    client ntlmv2 auth = yes
    restrict anonymous = 2
    unix extensions = no

    load printers = no
    printing = bsd
    printcap name = /dev/null
    disable spoolss = yes

    comment = Testing
    path = /var/samba/foo
    writeable = yes
    veto files = /._*/.DS_Store/
    delete veto files = yes

    create mask = 0664
    force create mode = 0664

    directory mask = 2775
    force directory mode = 2775
Comment 1 tanner 2014-05-15 20:04:39 UTC
Patched OSX to 10.9.3 and same behavior as exhibited in 10.9.2.
Comment 2 Kyriacos Georgiou (mail address dead) 2014-08-19 10:30:36 UTC
I have a similar issue with Samba 4.1-11 on CentOS. MS Office products cannot a save/overwrite new/existing files on the samba share.

OS (server): CentOS release 6.2 (Final)
OS (client): Windows 7
Samba version: samba-4.1.11

        comment = samba test workspace
        path = /netdisk2/smbtest
        valid users = @office-staff
        force group = office-staff
        browseable = yes
        writeable = yes
        read only = no
        guest ok = no
        directory mask = 2770
        force directory mode = 2770
        create mask = 2775
        force create mode = 2775

Hope that helps...
Comment 3 Jones Syue 2019-05-22 08:48:34 UTC

Found this issue too, the environment is macOS 10.14.4 and Office 2011, and docx files are placed on a remote NAS. When macOS opening the docx files on remote NAS through AFP mount or SMB mount, Office 2011 would prompt a windows said:
> This file is locked for editing.
> Locked by: another user
> Filename: test.docx
> You can open the file as read-only
Found that macOS disable Finder preview function could way around this issue. 3 steps as following:

1. macOS > Finder > View > Click 'Hide Preview'.
2. macOS > Finder > View > Show View Options 
   > unchecked checkbox 'Show icons' and unchecked 'Show icon preview'. 
   There is a button 'Use as Defaults' at the bottom, click it if required.
3. macOS disconnect the SMB/AFP mount first; then connect SMB/AFP mount again.
Comment 4 Jones Syue 2019-05-22 08:50:28 UTC
(In reply to Jones Syue from comment #3)

samba version is 4.4.16.
Comment 5 Björn Jacke 2020-04-08 09:40:03 UTC
if you reexport a mounted cifs or afp share, then any issues like this are not a big surprise. Please reopen the bug if this also happens with recent samba versions and a local filesystem. For finding a better solution than the reexport, you might consult a samba support option as listed at https://www.samba.org/samba/support/globalsupport.html