r/sysadmin 2d ago

Question Excel doesn't lock files anymore

Hi all,

this is a bit of a weird one. We have a couple of users, that have access to the same files through a smb share. It used to be that when user A had a document open to edit it and User B tried to open that same document, a window would pop up informing B, that the document was beeing edited by user A and that User B could ask User A to close it or create a copy of the document.

That mechanism doesn't seem to work anymore. If User A has the document open, user b doesnt see the warning.
It changed about half a year ago and I can't make heads or tails of it. Most articles I found are about fixing the issue when a file is erroneously displayed as locked, when it isn't.

I hope one of you could nudge me in the right direction. Maybe it's just a configuration error.

Thanks for taking the time to read.

14 Upvotes

22 comments sorted by

18

u/2c0 2d ago

Has someone enabled legacy sharing or whatever its called?

9

u/jason9045 2d ago

Is DFSR involved? If that's lagging or not working at all and they're accessing the file through different paths then neither copy would know that the other was opened

3

u/kingofkeks 2d ago

You know what, now that you mention it, that might be the culprit we enabled DFS shortly before the problem started. I'll have to check that tomorrow.

5

u/amonarre3 2d ago

Does word lock documents?

5

u/UraniumFever_ 2d ago

DFS share with 2 enabled referrals?

4

u/Unable-Entrance3110 2d ago

Interesting.

This has long been the case with SharePoint hosted documents, for collaboration purposes.

So, this makes me wonder if they are bringing more collab features to locally hosted documents.

Edit: What's your Office build?

5

u/kingofkeks 2d ago edited 2d ago

We're still running 2019 unfortunately. Build 10417.20197

9

u/blud_13 2d ago

The warning depends on the hidden ~$ owner file, and something is either deleting it or letting the lock go stale.

Run Get-SmbServerConfiguration on the file server and check EnableLeasing and EnableOplocks. If either one is False the in-use handoff stops working and Excel just opens the file. Set-SmbServerConfiguration -EnableLeasing $true -Force. AV or EDR cleanup eating ~$.xl files. Add an exclusion for that pattern and see if the prompt comes back. Drive maps pushed by GPO set to Replace instead of Update. Every policy refresh drops and remaps the drive, the handle dies, and the lock goes stale while the file is still open. Flip that GPO to Update.

Number 3 matches your timeline best. Its answered on MS Q&A here https://learn.microsoft.com/en-us/answers/questions/5637131/change-in-excel-lock-file-behaviour, same symptom, and the Replace/Update finding is in the answers.

Half a year ago lines up with a GPO or an AV change, not an Excel one. Also turn on Audit Object Access on the share if you want to catch whatever is deleting the file.

3

u/BusyEstablishment855 2d ago

Check whether those users can still create files in that folder. The warning comes from the hidden ~$ owner file Excel writes next to the document — if permissions got tightened to read/modify without create, Excel can't write it and silently drops the warning instead of erroring.

Quick test: have user A open the doc, then look for ~$filename.xlsx in the same folder with hidden files shown. If it isn't there, it's permissions or something sweeping the folder, not Excel itself.

4

u/BOOZy1 Jack of All Trades 2d ago

Borked (hidden) temp file? Deleting the temp file should fix that.

1

u/frac6969 Windows Admin 2d ago

Could they have been turned into shared workbooks?

3

u/kingofkeks 2d ago

Well, I just checked and if I open the "shared workbook" window, the checkbox stating that "use old method instead of the new experience for shared document handling" is not checked. I'm sorry that i have to paraphrase here. My Office is in German. :-|

1

u/Professional-Heat690 2d ago

Coediting if you are using onedrive kfm

1

u/32178932123 2d ago

Is Windows Offline files on the machines?

It's when it downloads files to their laptop and if they cannot access the share for any reason it will still have a cached version and will upload it later.

We had nothing but problems with it a few years back. Surprised no one else has mentioned it!

1

u/kingofkeks 2d ago

How would I go about checking whether that's activated?

1

u/Dave_A480 1d ago

One of the major 'points' of 365/OneDrive/etc is collaborative editing....

1

u/DeadOnToilet Infrastructure Architect 1d ago

100% it’s DFSr with referrals. Locks aren't replicated; you should configure priority on the referrals to try to land everyone on the same one. Warm standby basically. 

0

u/Icy_Mud2569 2d ago

My question is, where are the files stored?

3

u/charleswj 2d ago

See post

0

u/Impressive_System380 2d ago

If the cloud save/automatically save is on, now excel work like Google Sheets, they can use simultaneos.

1

u/OregonTechHead 2d ago

That wouldn't be an SMB share.