Office 2011, Mac OS Lion, Excel creates temporary file on Windows server 2008, SMB share how to stop?

9,973

Solution 1

If it works the way that Office does on Windows, which I'm assuming it does...

This file is essentially the temporary file that holds current edits and details in the event that the program or computer crashes mid-edit. Like you said, it also contains locking information for multi-user environments. In Windows it works the same way but the file is marked as a hidden/system file so it doesn't appear to the majority of users unless they are displaying hidden files.

This is a function of the Office suite and not the operating system so there really isn't any way to turn the functionality off. There may be an Office setting to disable the backup function but I'm still not sure that will remove the file entirely.

This may end up being more of a training issue than something that can be handled through software. Is there a reason your users disconnect from the VPN before saving and closing?

You could also try to edit the Auto Recovery options seen below to see if that helps: enter image description here

Solution 2

Microsoft Office programs (Excel, Word, etc.) create temporary files when you open a document. The temporary files are created in the source directory. This is not related to Auto Save or Auto Recover. All user edits are done in the temporary file, not the original file. When you save the document Excel or Word save a new copy of the document from the temporary file and delete the original file. This has been a function of how those programs work since I don't know when. The problem is that the users disconnect from the VPN leaving those files open, hence the temporary file is left behind. Secondarily, the file server still has the file open by the user with a lock. This is a function of SMB. In both cases this is the normal, expected and wanted behavior. If users are going to disconnect from the VPN without closing their files then you're just going to have to deal with it. This problem is not exclusive to the Mac clients.

Share:
9,973

Related videos on Youtube

Kevin
Author by

Kevin

Updated on September 18, 2022

Comments

  • Kevin
    Kevin almost 2 years

    I have an issue with Macs and a windows SMB share, when using Excel 2011.

    If I open an excel document from the windows share it will create a "Ghost file" starting with ~$ then the full filename e.g ::

    If I opened testdoc.xlsx a ghost file will be created called ~$testdoc.xlsx this is not a major issue as when the document is closed the file is removed.

    This file becomes a problem when my users are working through the VPN and if they disconnect their VPN without closing the excell document the "Ghost" file is left behind and then anyone on a mac can only open the file read only until this ghost file is removed.

    I have tried using the apple command ::

    defaults write com.apple.desktopservices DSDontWriteNetworkStores true
    

    This stops the macs writing resource forks and DS store files to the network files but does not stop this ghost file creation.

    Does anyone know what these files are? How to stop them being created? Is it safe to stop them?

    • HopelessN00b
      HopelessN00b over 11 years
      You don't want to stop it, but probably want to run a task periodically (in the wee hours of the night, when no one's on the file server) to purge the ~*.* files. What I do anyway, in addition to occasionally smacking users upside the where-ever with my LART.
  • Kevin
    Kevin over 11 years
    Hi Brent, Thanks for the response, I did try disabling the auto recover info but unfortunatly the file is still created. The reason the VPN is not allways disconnected properly is down to poor internet connection at remote locations.
  • Brent Pabst
    Brent Pabst over 11 years
    @Kevin I'm assuming they re-connect and re-open the file is that right? It should see the existing file and remove it when they are finished the next time. Could still be some confusion and locking until that happens as you mention. No real good way around this other than a scheduled task on the server to remove files older than a certain amount of time.
  • Alex Berry
    Alex Berry over 11 years
    We had a request of a similar nature but for windows clients, our workaround was to setup share access via webdav, either via sharepoint or directly via IIS. This allows for file shares to be mounted via https, so flakey connections aren't as much of a problem. It is a bit of a headache to get set up properly though, and can be percieved as somewhat of a security risk, though with proper testing and configuration it's secure. Macs can mount webdav shares too, though I'm not sure the best method to authenticate them in this instance.
  • Philip
    Philip over 11 years
    Good information up until the part about AutoRecover... You can't disable the edit file, it's not an option.