I am working with a Mac mini (Macmini7,1) running High Sierra 10.13.6 with SMB file sharing to a few connected computers. Things have been working fine, but since updating a couple of the client machines to Mojave 10.14, when saving changes to MS Word documents we get a "Grant File Access" dialogue wanting to access a file named .smbdeleteAAAABBBBetc

I gather from various sources such as .smbdelete files accumulating on server share and https://discussions.apple.com/message/30046649#message30046649 that these files are the result of the SMB client software trying to be careful when it deletes a file (basically rather than delete the file, it is first renamed and hidden to perhaps make it easier to deal with multiple processes acting on the file and locking issues and stuff like that)

Apple introduced this behavior in OS X 10.10 you can find it in the source code here:


The comment above the code that does it is:

* We have an open file that they want to delete. Use the NFS silly rename
* trick, but try to do better than NFS. The picking of the name came from the
* NFS code. So we first open the file for deletion. Now come up with a new 
* name and rename the file. Make the file hidden if we can. Now lets mark
* it for deletion and close the file. If the rename fails then the whole call 
* should fail. If the mark for deletion call fails just set a flag on the 
* vnode and delete it when we close.

In our situation, almost every time a MS Word document is saved after a change has been made, this type of dialogue pops up: Grant File Access dialogue

Since the .smbdelete file is invisible in the Finder and File Selection dialogues, one cannot select it if you hit the "Select..." putton. Hitting "Cancel" sometimes results in MS Word continuing to edit the properly newly saved file, and sometimes results in MS word editing the .smbdelete file, and sometimes a new File Selection dialogue pops up.

I think that when MS Word saves changes to a file, it first creates a new file with the changes, then "deletes" the original file, then renames the new file with the original file name. The deletion of the original file does this smbdelete rename thing, and somehow the timing of the various renames and deletes and the like get messed up and MS Word gets confused about which file is which and what it should do about it.

Is there any way to fix this so it doesn't happen, or are we stuck copying the files we need to work on to local storage and moving them back when we are done?

In looking for online references to this, I find lots of people complaining about .smbdelete files littering their servers, and some references to troubles when dealing with saving password protected Excel files, but no references to this specific issue. We do not seem to be have experienced this issue with High Sierra client machines.

You must log in to answer this question.

Browse other questions tagged .