Mac Bug Connecting to Non-Apple SMB Shares

Mac Bug Connecting to Non-Apple SMB Shares

Set my folders free!


Earlier this year we received a number of reports from users that were unable to delete, move or rename documents on a new SMB file share. Eventually we were able to narrow it down enough to be able to consistently duplicate what they were seeing. It appears the SMB client in Mac OS X (10.11, 10.12 and possibly others) is overly aggressive with file locks.

Here is a movie of the bug in action. Many of the Mac administrators we reached out to for confirmation claimed they didn’t see it, until they followed our steps.

The bug seems specific to non-Apple SMB shares (we see it with Microsoft Server 2012r2), we can’t replicate it with OS X Server SMB shares.

Turning on/off Finder previews has no effect. Our machines are not bound to Active Directory. We have confirmed with other institutions that have their clients and server bound to Active Directory and they see the same issue.

We’ve notified Apple and Microsoft about the issue. We have been informed this is an Apple issue, but we have no timeline to share for a fix. We hope Mac OS 10.13 High Sierra will include it.

46 Comments
  • Graham
    Posted at 07:03h, 30 June Reply

    I couldn’t reproduce this on a Synology share, so perhaps it is Microsoft Window Share specific.

    • Richard Glaser
      Posted at 17:24h, 30 June Reply

      Hello Graham:

      Thanks for the feedback

      What version of macOS did you test?

      Can you share your SMB configuration on your Synology share?

      Synology NAS’s appears they could support multiple SMB versions and configurations. We didn’t test against Synology, but a Microsoft Server 2012r2 and Qumulo which is a scale-out NAS http://qumulo.com/.

      But, if you post details of your Synology model and SMB configuration I can add it onto the AppleCare Enterprise problem ticket.

  • Steve Wood
    Posted at 18:19h, 05 July Reply

    We have seen the same behavior on Nasuni (https://www.nasuni.com) caching servers. What we have found is that working in list view mode instead of column view mode seems to alleviate the problem. Not the ideal solution, but it does work. I know that our sys admins have opened this with Apple (I do not have radar info), and I believe Nasuni has also opened a bug with Apple.

    • Richard Glaser
      Posted at 15:47h, 06 July Reply

      Hello Steve:

      Thanks for the feedback. We are doing some testing and will reply back with more details, but according to discussion with Apple “there were a number of factors that worked around the behavior that could contribute to being unable to reproduce the issue”. And it is rumored that macOS High Sierra might fix the issue 😉

      We will post more details, after we have done some more in-depth testing.

  • kaiserh
    Posted at 00:30h, 14 September Reply

    I can confirm that I’m seeing this issue on a Windows Server 2016 file server. Clients are all Macs and are not AD bound. Also having permissions issues saving Photoshop documents (and in other apps too).
    I’m going to be testing High Sierra as soon as I possibly can.

    • Richard Glaser
      Posted at 15:29h, 14 September Reply

      Hello Kai:

      Let us know the status of your macOS High Sierra testing. We will test too and post back to the blog with details.

  • Jeff Scott
    Posted at 13:44h, 14 September Reply

    Do you have the Apple Case # so that we can also run this up the chain via our Apple Engineer?

    • Richard Glaser
      Posted at 15:44h, 14 September Reply

      Hello Jeff:

      Here is the Microsoft Case number: 115110913354757.

      I am working with AppleCare Enterprise to get the Bug Reporter # and will post back.

  • Jeff Scott
    Posted at 18:59h, 14 September Reply

    Thanks Richard, I’ll be keeping a close on this thread.

  • Richard Glaser
    Posted at 20:53h, 14 September Reply

    Hello Jeff:

    I am still waiting on AppleCare Enterprise. So, I the following bug to…

    Apple Bug Reporter
    Radar Number: 34441886

    and

    Open Radar
    https://openradar.appspot.com/radar?id=6119440361979904

    Let me know if you need anything else.

  • Allan Andersen
    Posted at 09:09h, 22 September Reply

    Hi guys
    Any update on the issue?

    Kind regard
    Allan

    • Richard Glaser
      Posted at 18:06h, 22 September Reply

      Hello Allan:

      We haven’t been able to replicate the issue in macOS High Sierra GM. Have you testing macOS High Sierra GM?

      If you don’t have access, you should try to get it, but if not, try the final release and let us know your experience.

  • Richard Glaser
    Posted at 20:28h, 26 September Reply

    FYI:

    We tested the bug with macOS High Sierra 10.13 and it appears to be fixed. We couldn’t replicate the issue. If you still are seeing the issue, please comment back with details on your SMB server configuration.

  • Kai Howells
    Posted at 02:02h, 27 September Reply

    I’ve just tested with High Sierra 10.13.0 version 17A365 and Windows Server 2016 and the issue seems to be resolved.

    • Richard Glaser
      Posted at 16:23h, 27 September Reply

      Hello Kai:

      Great, glad to hear it. Please post back if you have any other issues.

  • mattscheibetv
    Posted at 15:53h, 27 September Reply

    Hi @ll with the final release of 10.13. I do have this same issue on my Synology RAID!
    Anyone found a solution to it?
    Thanx, Chris

    • Richard Glaser
      Posted at 16:22h, 27 September Reply

      Hello Chris:

      Can you share details about your Synology RAID? Like model/make and configuration. If you can share, I can ping AppleCare Enterprise about it. Have you contacted Synology technical support about the issue?

    • Richard Glaser
      Posted at 18:30h, 27 September Reply

      Hello Chris:

      We’ll need to know the model number, configuration and current firmware version of the Synology box.

      And if you are willing, can you grab a packet capture and smb debug logs? If so, you can directly contact me on MacAdmin slack and send me the files.@richard.glaser

      1. Mount an SMB share, then dismount it

      2. Enable SMB debug logging:
      sudo sysctl -w net.smb.fs.loglevel=15

      3. Start a packet capture, replacing BSDName with the interface you are using (en0, en1 etc)
      sudo tcpdump -i BSDname -s 0 -B 524288 -w ~/Desktop/100290794256.moverename.pcap

      Note: “-s 0” includes a zero, not the letter O.
      When prompted for a password, enter the one for your administrator account.

      (More info in this kb)
      Capture a packet trace using Terminal on your Mac
      https://support.apple.com/en-us/HT202013

      4. Mount the SMB share and reproduce the issue

      5. Unmount the share and stop the packet capture
      Control-C

  • Richard Glaser
    Posted at 18:31h, 27 September Reply

    And to disable SMB debug logging, issue the following terminal command:
    sudo sysctl -w net.smb.fs.loglevel=0

  • Adrian Cooke
    Posted at 15:17h, 09 October Reply

    I appreciate that I’m late to looking at this issue.

    I cannot replicate the issue using macOS 10.2.6 with a Windows 2008 R2 SMB share. However, I have seen issues like this before, which are usually linked to Windows permissions. The main culprit is ‘Creator Owner’, which is a massive NO NO for working with macOS.

    My best practise advice for Macs working with SMB shares is as follows:
    • Flat permissions across the entire share
    • Apply permissions to groups with Read Only or Modify access
    • Never use the Creator Owner permission
    • Avoid granting Full Control permissions to regular users

    • Richard Glaser
      Posted at 18:24h, 10 October Reply

      Hello Adrian:

      Thanks for the feedback & best practices advice, but the issue was confirmed by Apple and supposedly fixed in macOS High Sierra. With ours and others testing, it appears it is fixed.

  • Paul Major
    Posted at 23:16h, 23 October Reply

    I am encountering this same issue on High Sierra (10.13). We are using a Synology RAID (Model RS18016xs+ / DSM 6.1.3-15152 Update 4 / INTEL Xeon E3-1230 v2 3.3Ghz). Any help/advice on this would be greatly appreciated. Thank you!

    • Richard Glaser
      Posted at 03:36h, 25 October Reply

      Hello Paul:

      Thanks for the feedback. I will forward the configuration information to Apple Enterprise support.

      Have you tried contacting Synology technical support about it?

    • Richard Glaser
      Posted at 16:25h, 25 October Reply

      Hello Paul:

      I had a few questions regarding the behavior on 10.13:

      1. Does terminal work when Finder fails?
      2. What about a 3rd party Finder alternative, such as Pathfinder?
      3. Did Synology offer any advice?
      4. Can you try disabling notifications in the nsmb.conf file and let me know if Finder’s behavior changes? (Don’t grab the debug data with this change enabled)

      sudo -s
      echo “[default]” > /etc/nsmb.conf
      echo “notify_off=yes” >> /etc/nsmb.conf

      You can delete the /etc/nsmb.conf file to revert to standard behavior.

  • Brandt Ziegler
    Posted at 17:16h, 08 November Reply

    Hi Richard. Really great stuff you have here. I am able to reproduce this bug on MacOSX 10.13 High Sierra on a Synology DSM416 running DSM 6.1.4-15217. I have submitted a support ticket with Synology yesterday and am still waiting to hear back.

    I did try that last step in the comment reply to Paul Major, but have not tried terminal or a 3rd party finder alternative. For terminal, do you want all of the folder operations (creating folder A/B/C, etc) done through terminal or just the renaming step?

    I also have a .pcap file from the operation but I haven’t been able to properly parse it yet.

    Thanks again for the super detailed explanation and reproduction steps.

    • Richard Glaser
      Posted at 20:37h, 08 November Reply

      Hello Brandt:

      Thanks for the reply, yes if you can following the folder operations creating folder A/B/C, etc) needs to be done in Finder as this is a primarily a Finder bug. Are you seeing the issue just using Terminal on macOS?

  • Corey Riggle
    Posted at 21:30h, 08 November Reply

    I have the same problem on my EMC fileserver.

    • Richard Glaser
      Posted at 22:00h, 08 November Reply

      Hello Corey:

      Thanks for sharing, can you share configuration and specifications? Issues only with Finder or macOS terminal too?

  • Truwarrior22
    Posted at 02:15h, 09 November Reply

    Having issues after migrating to Server 2016. Can create files from Mac, but can’t delete it off the server from Mac or even Windows.

    • Richard Glaser
      Posted at 16:23h, 09 November Reply

      Hello:

      I would recommend checking the accounts/groups permissions that were used to create the files. What version of macOS? This doesn’t sound like the bug mentioned in the blog post, but a permissions issue with your server.

      • Truwarrior23
        Posted at 20:37h, 10 November Reply

        Updating to High Sierra and removing NTFS owner permissions resolved the issues. User only have modify now. Was also having issues save as from Adobe. Would save it as a hidden file.

        • Richard Glaser
          Posted at 05:37h, 11 November Reply

          Hello:

          Sorry, so the issue is resolved? If so, great. If not, can you post back with more details and explain?

          • kaiserh
            Posted at 11:18h, 13 November

            I’d like some more info as well, if this has fixed the problem for you. When you say your removed NTFS owner permissions, do you mean that you changed all users to only have “Modify” permissions instead of “Full Control”?
            I’ve also been having the issue with Adobe apps saving documents that are hidden and would like to get to the bottom of this…

  • Heidi
    Posted at 17:19h, 27 November Reply

    Hello, We’ve also been having the same issues. Renaming files, Moving files, etc.. and are currently running on High Sierra. It was the same on all previous versions. We run on an smb server and have tried ntfs servers as well and same issue. Also, have issues using adobe illustrator, saving a file. Then if I go into the file and modify it, save it. Go back into it, the second save session will not be saved and in fact shows as the original. The only fix i found for this was to do a save as every time and save over the previous versions. The big issue for us though is the file renaming and password required, enter the password, and still will not let us rename. It gets to the point we have to create a new folder and drag everything into the properly named new folder…then delete the unwanted version. It’s irritating. Any fix yet?
    Ugh!

    • Richard Glaser
      Posted at 19:40h, 27 November Reply

      Hello Heidi:

      Are you seeing this issue with applications that officially support opening/saving to network shares? Like non-Adobe applications?

      Adobe recommends saving files to a local disk vs network share.

      For example:
      https://helpx.adobe.com/photoshop/kb/networks-removable-media-photoshop.html

      Previously we where using Microsoft SharePoint for document storage and used Transmit, which would cache the file locally and then open it and allow editing and then re-upload it to the file share automatically on save. Not ideal, but maybe a workaround for your environment.

      • Heidi
        Posted at 20:09h, 27 November Reply

        Hello Richard, Yes it’s other formats as well, essentially everything I save. Folders, etc.. as well. I’ve tried doing saves locally and then moving them to where they need to be on the shared drives when complete, and get the same errors.
        Thanks.

        • Richard Glaser
          Posted at 20:28h, 27 November Reply

          Hello Heidi:

          Can you share details about your SMB file server configuration specifics and notable settings that you are using with your mac systems clients?

  • Eric
    Posted at 19:32h, 08 December Reply

    Richard, We were having a similar issue too but on a debian based samba share for network homes. I removed all ACLs and disabled NT ACLs from the home folders which seemed to work for the file locking issue. The ACLs were also prohibiting the extraction of zip files. Also I have enabled VFS objects of fruit, catia and ea_support = yes in the share configuration itself and things are much more smooth now. Now if I can just keep Chrome and Safari from randomly crashing 🙁

    • Richard Glaser
      Posted at 23:42h, 14 December Reply

      Hello Eric:

      Thanks for the feedback. What version of macOS are you running? The fix is specific to the operating system bug, is only included with macOS High Sierra.

  • AK
    Posted at 09:10h, 22 January Reply

    Hi,
    Issue still exist… with also High Sierra/Sierra/El Capitan installed, latest version, but no luck…
    Still ask for admin password, or it will not also allow you to delete/save on the server.

    • Richard Glaser
      Posted at 22:59h, 30 January Reply

      Can you provide details of server you are using with the client.

      • kaiserh
        Posted at 23:24h, 30 January Reply

        @Richard Glaser –

        I’m still seeing this issue with macOS High Sierra 10.13.1 and 10.13.2 – it did look like it was initially fixed in 10.13, and the issue was definitely better, however now with more heavy use and newer updates, we’re back where we were before.

        The server is Windows Server 2016.

        The symptoms are most apparent when we go into the Computer Management > Shared Folders > Open Files

        Even on a small network (10-20 workstations) there will often be thousands and thousands of open files, all open in Read mode.

        These files opened in Read only mode are not an issue on a server running a Unix-type operating system. Unix is able to move, rename and delete files that are opened with a read-only file handle.

        Windows on the other hand won’t do anything to any file with an open file handle. You can’t rename it, you can’t move it, you can’t delete it. Nor can you do anything to any folder directly above this file (e.g. it’s containing folder)

        We also see some files that are opened with Write + Read access – this is to be expected when people are working off the server.

        It’s the thousands of Read only file handles that’s causing these problems. If we then select the open files and force them to close on the server, everything starts working again (until the open files build up and build up).

        • Richard Glaser
          Posted at 22:42h, 13 February Reply

          Hello

          Let me forward that information to our AppleCare Enterprise problem ticket and I will let you know what Apple responds. Thanks for the information.

          • kaiserh
            Posted at 22:47h, 13 February

            Thanks Richard – it’s frustrating that Apple are pretty much EOLing macOS Server (basically turning it into Profile Manager.app) and yet we have so many issues working with 3rd party server platforms.
            I’m more than happy to gather additional information as required.

          • Richard Glaser
            Posted at 23:02h, 13 February

            Hello Kai:

            Ok, np. I will let you know what additional data they request.

  • Richard Glaser
    Posted at 20:43h, 15 February Reply

    Hello Kai:

    If you are on MacAdmin slack, can you send me a direct message. I will need you to provide more details.

    @richard.glaser
    https://macadmins.slack.com/team/U09H7JPPE

Leave a Reply