Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

What are .smbdelete*** files?

Hi


Does anyone know where .smbdelete**** files come from?


When using a windows 2008 server for home space .smbdelete files are created and can be found, amonst others, in ~/Library/Saved Application State/com.apple.application name.savedState.

The files appear when an application is launched and dissapears when the application is closed.

Whilst the application is running it is impossible to delete the files!


The problem is that I need to move ~/Library/Caches from the server to the local machine but if the login script isn't quick enough in deleting the Cache folder before an application is launched an .smbdelete*** file is created in the Caches folder causing the remove Caches process to fail.


opensnoop doesn't seem to register the .smbdelete file being accessed so I can't figure out what process is creating the file.


Cheers

Posted on May 31, 2012 3:27 AM

Reply
6 replies

Apr 8, 2016 5:00 AM in response to Alan Price1

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

http : //www.opensource.apple.com/source/smb/smb-759.40.1/kernel/smbfs/smbfs_smb.c

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.

What are .smbdelete*** files?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.