Fix Word and Excel Deleting Files from Samba Network Share
Question details
Users need to troubleshoot and fix an issue where saving Word or Excel documents to a Linux Samba share results in the original file disappearing, leaving only a temporary file behind.

- Product
- Microsoft Office, Linux Samba
- Device & OS
- not provided
- Scenario
- Saving edited documents to a mapped Samba network drive.
- Observed behavior
- The original file is unexpectedly deleted from the shared folder and replaced by an unusable temporary file after a save operation in Word or Excel.
Ensure you have the exact network path being used to access the share, and verify that you have administrative privileges to map network drives on your local machine.
Use Local Network Addressing Instead of FQDN
Change the network share path from a Fully Qualified Domain Name (FQDN) to a local NetBIOS name or IP address to prevent permission and authentication conflicts.
When Microsoft Office saves a file, it creates a temporary file, deletes the original, and renames the temp file. Accessing a local Samba share via an FQDN can cause authentication protocols to misinterpret permissions, causing the rename process to fail and leaving only the temporary file behind.
Open File Explorer, right-click the mapped network drive currently using the full domain name, and select 'Disconnect'.
Click 'Map network drive' in File Explorer. In the Folder box, enter the path using the server's local IP address or NetBIOS name (e.g., \\192.168.1.50\ShareName) instead of the fully qualified domain name.
Check the 'Reconnect at sign-in' box, click Finish, and enter your local network credentials when prompted.
Open an Excel or Word file from the newly mapped path, make a minor edit, and save it to ensure the original file is preserved.

Verify Samba Server SMB Configuration
Ensure the Linux Samba server is configured with consistent NetBIOS names and aliases to support Microsoft's strict file locking and saving mechanisms.
Use WPS Office for Reliable Network File Management
If network permission conflicts persist with Microsoft Office, WPS Office offers a free, lightweight alternative. It provides reliable file saving capabilities over local and network drives without the strict file-locking errors that lead to deleted documents.
- 1. Download WPS Office: Visit the official WPS website and download the free WPS Office installer.
- 2. Open network files: Launch WPS Writer or Spreadsheet, click 'Open', and navigate to your mapped Samba network drive.
- 3. Save securely: Edit your documents and click 'Save'. WPS Office safely updates the file without triggering complex locking conflicts.

Frequently Asked Questions
Why does Office leave temporary files on my Samba share instead of the saved document?
When saving, Office applications create a temporary file, delete the original document, and then attempt to rename the temporary file to the original name. If network permissions or FQDN pathing issues disrupt this sequence, the final rename fails, leaving the temporary file stranded and the original deleted.
How can I recover a Word document that was deleted from the network share?
Look in the network folder for hidden temporary files created at the exact time of the save. You can often recover your data by copying the temporary file to your local desktop and manually changing its extension to .docx or .xlsx.
Does this file saving issue affect local hard drives?
No, this specific behavior typically only occurs on network shares, particularly SMB or Samba configurations, where network addressing and strict file-locking protocols conflict with the application's saving mechanism.




