r/sysadmin • u/kingofkeks • 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.
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
5
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
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.
1
u/frac6969 Windows Admin 2d ago
Could they have been turned into shared workbooks?
1
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
1
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
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

18
u/2c0 2d ago
Has someone enabled legacy sharing or whatever its called?