When trying to open some files, I get error: "access denied" or "This file has been locked by another user."

locked

LibreOffice 7.5.7.1
Windows 11 Home
AVG Internet Security

Please also mention which antivirus you use.

Running AVG Internet Security

Try disabling your antivirus for a test, to see if this helps. If so, you might need to add soffice.bin file in LibreOffice program directory to the antivirus exceptions list.

Thanks. Files open when I turn off AVG. Now, how do I add soffice.bin to the antivirus exceptions list?

No idea - I don’t use AVG. I just know that lately, multiple users report such problems, and all of them use AVG and/or Avast (products of the same vendor). Please refer to your antivirus manual for instructions. when you succeed, it would be nice of you to describe the steps here, so that other users could learn. Thank you!

This link describes how to add exceptions to AVG: https://support.avg.com/SupportArticleView?l=en&urlName=avg-antivirus-scan-exclusions&q=How+to+add+soffice.bin+file+in+LibreOffice+program+directory+to+the+antivirus+exceptions+list.&supportType=home
However, this did not solve the problem. Files still show “access denied” Reaching out to AVG.

You probably need to add C:\Program Files\LibreOffice\program\soffice.bin which is in the same folder as the exe files. You might need to navigate to the folder and type it in. The exe files won’t help but that will.
Cheers, Al

:+1:t2: If your request is public, please post a link to it here as well.

Other similar posts:

I have the same issue, but soffice.bin is already in my program folder. My antivirus software is Windows Defender.

I bought a computer from my neighbor and inserted the flash drive from my old computer. When I try to open a LibreOffice spreadsheet that’s on my flash drive, I get the same “Document in Use” window shown above.

LibreOffice 7.6.6.3
Windows 10 Home
Windows Defender

Click the conveniently located “Allow an app through controlled folder access” in Start menu > Settings > Update & Security > Windows Security > Virus & threat protection > Ransomware protection > Manage Ransomware protection > Allow an app through controlled folder access > Add an allowed app > Recently blocked apps and select soffice.bin from the top of the list

Thanks! That was quite a trek.

I got as far as Recently blocked apps, but no apps were listed. I tried clicking Browse all apps, but again found none listed.

If it makes a difference, there was a step Controlled folder access before Allow an app through controlled folder access. Controlled folder access had to be toggled from off to on. It’s currently off again.

It might be just a lock file on the flash drive. Close LibreOffice and look in the flash drive using file explorer for a small file beginning with ~ and ending with .lock
You might need to enable view hidden folders and files in file explorer before you can see it.
When you find it, you can just delete it. If you’re curious, you can open it in notepad to see what it says.
Lock files are just small files created when you open a office file to show that you have it open so somebody else can edit it at the same time. They are deleted when you close the file. If LibreOffice can’t close the file correctly because of crash or disconnection then they can be left behind.
Make sure to click Eject before removing usb drives. Windows tend to cache files and complete writing them to disc later; using Eject forces the write.