Office lock files on SMB share seem to still be present after Office is closed

This happens all the time in my experience for enough Mac clients that hit a server that can’t keep up with the requests. You almost surely cannot change this on the Mac end and need to either deal with broken temporary files or be sure your support organization reviews the performance / loading of the appliance and OS that actually runs the SMB shares.

At best, you could check what version of SMB was negotiated and if you’re using an older protocol, try to force your mac to connect SMB v3 or so. (This is the only time when you might be able to “solve this” on your end)

  • https://support.apple.com/en-us/HT207520
  • https://support.apple.com/en-us/HT208209
  • https://support.apple.com/en-us/HT205926

You can also upgrade to High Sierra as it has a lot of settings changes to make SMB browsing and sharing better.

Things to ask the people that support the SMB share at work:

  • give them specific dates, times, IP address of your mac when you see these issues.
  • give them the full path
  • ask if the storage / disks have convention or performance overload
  • ask if there is a macOS best practices document from the vendor and if they can or plan to implement all the items.
    • Some specific items are patching to recent SMB versions that include things like vfs_fruit extensions, disabled changing permissions from mac clients on file moves, clean up scripts or suppression of things like .DS_Store files, whether .TemporaryItems is writable by all at the root of the share, if they can enable debugging logs for the folder where you save your files or set up a small test share so they can change that to match the “best practices” and see if these orphaned / ghost files no longer happen
  • tell them if you can make this happen reliably and on command - that is gold for them to debug a share - without it they can’t test things out methodically and have to wait for a timing or repeat of the issue