File Sharing Problems

Fix Word and Excel Deleting Files from Samba Network Share

Adam DavisAdam Davis Nov 3, 2026 868 views

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.

How to Fix Office Deleting Files from a Samba Network Share
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.
Before you start

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.

Solution 1Recommended

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.

1
Disconnect the current network drive

Open File Explorer, right-click the mapped network drive currently using the full domain name, and select 'Disconnect'.

2
Remap using local network addressing

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.

3
Reconnect and authenticate

Check the 'Reconnect at sign-in' box, click Finish, and enter your local network credentials when prompted.

4
Test the save function

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.

Use Local Network Addressing Instead of FQDN
Temporary File Recovery: If you lost data, check the folder for files starting with '~$' or lacking an extension. Copy the temporary file to your desktop and rename it to include the '.docx' or '.xlsx' extension to recover your work.
Free Microsoft Office alternative

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. 1. Download WPS Office: Visit the official WPS website and download the free WPS Office installer.
  2. 2. Open network files: Launch WPS Writer or Spreadsheet, click 'Open', and navigate to your mapped Samba network drive.
  3. 3. Save securely: Edit your documents and click 'Save'. WPS Office safely updates the file without triggering complex locking conflicts.
Fully compatible with Microsoft Word (.docx) and Excel (.xlsx) formatsReliable and straightforward file saving on Samba network sharesFree and lightweight suite that uses fewer system resourcesFamiliar tabbed interface makes migrating effortless
microsoft office alternative - wps office

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.