[Solved] Can't Open Any Files ("Write Error")

Discuss the word processor
Post Reply
jessmac78
Posts: 8
Joined: Tue May 05, 2020 10:06 pm

[Solved] Can't Open Any Files ("Write Error")

Post by jessmac78 »

Yes, I know this has been posted about many times in the past, and I did do a search for it here before deciding to start a new topic. But most of the results I found were to do with saving documents. My case is a bit different, and a bit more involved.

It started when I was trying to open an ODT file located on my external hard drive. I got a "locked for editing by unknown user" error message. Writer asked if I wanted to open up the read-only file, or make a copy. I made a copy and I saved it to the Documents folder on my main hard drive.

All was well with the copy until today. I tried to open it and got the "locked for editing" message. I decided to create a copy, but got the "Write Error. The file could not be written." error message. I tried to resolve the "locked for editing" situation, so I found the ~lock file and deleted it. I tried again to open the file and got the "Write Error" message again.

I thought maybe the file itself got corrupted somehow. But then I tried to open other ODT files on both my external hard drive and my regular hard drive, and got the "Write Error" message for all of them.

I do have sufficient rights/permission for the directories, so I'm pretty sure that's not the problem. I tried moving the file to my desktop but when I open it with Writer I get the same error. In my search I found some discussion about temporary files creating an issue... I'd recently done Disk Cleanup on my hard drive. Could that have anything to do with it? I'm not running any anti-spyware/malware programs in the background, so it can't be that.

I'll admit I've also got Microsoft Office installed on my computer (was very recently installed ... don't ask me for the background behind that.. I needed some other functionality for some specific business files). Could there be some kind of conflict with that? Interestingly if I open up the file in Word, there are no problems at all.
Last edited by Hagar Delest on Wed May 13, 2020 5:01 pm, edited 1 time in total.
Reason: tagged solved
OpenOffice 4.1.1 on Windows 7
User avatar
Zizi64
Volunteer
Posts: 11363
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: Can't Open Any Files ("Write Error")

Post by Zizi64 »

jessmac78 wrote:I'll admit I've also got Microsoft Office installed on my computer (was very recently installed ... don't ask me for the background behind that.. I needed some other functionality for some specific business files). Could there be some kind of conflict with that? Interestingly if I open up the file in Word, there are no problems at all.
I do not know the solution. But I can say you that I use the LibreOffice since the forking day - instead of the OpenOffice, and I never experienced such problem on Windows 7 nor on Windows 10. And I never used the Microsoft related virus and malware protection softwares. (I used/use NOD32 and others. And I have not any MS Office version on my PC today - tha last version was the MS Office XP (2002).
Tibor Kovacs, Hungary; LO7.5.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
User avatar
Hagar Delest
Moderator
Posts: 32667
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Re: Can't Open Any Files ("Write Error")

Post by Hagar Delest »

LibreOffice 7.6.2.1 on Xubuntu 23.10 and 7.6.4.1 portable on Windows 10
jessmac78
Posts: 8
Joined: Tue May 05, 2020 10:06 pm

Re: Can't Open Any Files ("Write Error")

Post by jessmac78 »

Zizi64 wrote:
jessmac78 wrote:I'll admit I've also got Microsoft Office installed on my computer (was very recently installed ... don't ask me for the background behind that.. I needed some other functionality for some specific business files). Could there be some kind of conflict with that? Interestingly if I open up the file in Word, there are no problems at all.
I do not know the solution. But I can say you that I use the LibreOffice since the forking day - instead of the OpenOffice, and I never experienced such problem on Windows 7 nor on Windows 10. And I never used the Microsoft related virus and malware protection softwares. (I used/use NOD32 and others. And I have not any MS Office version on my PC today - tha last version was the MS Office XP (2002).
Thank you for the suggestion! I've gotten a few recommendations from friends and coworkers to use LibreOffice. I will look into using that instead. This problem didn't start happening until after I had installed the new MS Office version, so I thought it was a conflict with that (although it didn't occur right away, only 2 weeks or so after MS Office was installed).
OpenOffice 4.1.1 on Windows 7
jessmac78
Posts: 8
Joined: Tue May 05, 2020 10:06 pm

Re: Can't Open Any Files ("Write Error")

Post by jessmac78 »

Hagar Delest wrote:See if that helps: [Solved] Unable to save file due to write error.
Thanks for the heads up. I wasn't sure this was what I needed as I saw the issues mentioned were in saving the document, whereas mine is in opening documents. But I noticed this in the final post in the thread:
When you oper a .odt file Writer creates the temporary files as a copy of the "as-opened" .odt file. If you do a Save, Writer first updates the temporary file, and then [presumably?] copies the temporary file as the final, saved .odt file.

So if anything prevents access to the temporary file folder Writer will be unable to save.

A simple test would be to use Tools > Options > OpenOffice > Paths ..., to set the Temporary files path to a folder on a USB memory stick. Open a .odt file for editing. Remove the USB stick. Writer now no longer has access to the temporary files or folder.
I had a similar problem months back with the Temporary files path, so I'd done as suggested here by setting it to a folder on my external hard drive. Recently, the USB ports on the front of my desktop's tower have become loose and at times a good connection between the port and the external hard drive cannot be maintained. I'm wondering now if these connection issues could be messing with the temp files created by Writer whenever it saves (and maybe that's one reason why I was getting the "locked for editing" messages several times)? That wouldn't explain why I'm having trouble opening files located on my main hard drive, though.
OpenOffice 4.1.1 on Windows 7
User avatar
RoryOF
Moderator
Posts: 34618
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Can't Open Any Files ("Write Error")

Post by RoryOF »

Have you rights, outside of OpenOffice, to write a file to the target folder, using (say) Notepad?
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
jessmac78
Posts: 8
Joined: Tue May 05, 2020 10:06 pm

Re: Can't Open Any Files ("Write Error")

Post by jessmac78 »

I'm pretty sure I have. I'm able to use Notepad and Wordpad without any issues.

I just tried to open the ODT file once again, and am no longer having the "Write Error" issue. Now it says "locked for editing by unknown user." If I select "open a copy", it seems to work. Strange.

Edit: I deleted the hidden ~lock file, tried to open the file again and was successful... no "write error" message. Not holding my breath, though.. I'm sure it'll happen again at some point.
OpenOffice 4.1.1 on Windows 7
User avatar
RoryOF
Moderator
Posts: 34618
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Can't Open Any Files ("Write Error")

Post by RoryOF »

A lock file can be left after an improper termination of OpenOffice, sometimes caused by a program or computer crash, sometimes by overhasty close down of OpenOffice and the computer, which does not allow time for the internal write buffers of the disk drive to flush to disk. There can sometimes also be left another hidden lock file in the root of the OpenOffice User Profile - don't forget about this one. It may not always be left, but if there is unexplained inability to write to or edit a file it may be present and causing problems.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
jessmac78
Posts: 8
Joined: Tue May 05, 2020 10:06 pm

Re: Can't Open Any Files ("Write Error")

Post by jessmac78 »

That makes sense... I did have an issue not long ago in which my computer shut down out of the blue. That may have had something to do with it. Thanks for the heads up on a possible hidden lock file in the root of the User Profile. I hadn't even thought of that. I'll keep my eyes peeled for that.
OpenOffice 4.1.1 on Windows 7
Platinet
Posts: 4
Joined: Tue May 12, 2020 8:25 pm

Re: Can't Open Any Files ("Write Error")

Post by Platinet »

Hi jessmac78. You can always try to reinstall OpenOffice to quickly check if their is an issue there. You could then update to the 4.5.0 version of OpenOffice. https://ci.apache.org/projects/openoffi ... 0648b7.exe. This sounds like an issue caused by Microsoft Operating System..
OpenOffice 4.50m1 on Linux Mint 19.3 64-Bit
jessmac78
Posts: 8
Joined: Tue May 05, 2020 10:06 pm

Re: Can't Open Any Files ("Write Error")

Post by jessmac78 »

Thanks, Platinet. The problem seems to have been resolved for the time being, but I'll definitely keep this in mind for the future.

Funny you mention updating the version. The last few times I've had OpenOffice open and it checked for updates, it always failed. Either it would notify me of the new update and when I tried to download it failed, or it hadn't even arrived at that point yet (simply just "failed" after I clicked to check for updates).
OpenOffice 4.1.1 on Windows 7
User avatar
RoryOF
Moderator
Posts: 34618
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Can't Open Any Files ("Write Error")

Post by RoryOF »

The 4.5.0 update is still a development version, not yet released, and is _NOT_ guaranteed to be stable; use at your own risk!
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
John_Ha
Volunteer
Posts: 9584
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

Re: Can't Open Any Files ("Write Error")

Post by John_Ha »

It sound like a permissions problem - see [Tutorial] Problems with Windows Defender under Windows 10
LO 6.4.4.2, Windows 10 Home 64 bit

See the Writer Guide, the Writer FAQ, the Writer Tutorials and Writer for students.

Remember: Always save your Writer files as .odt files. - see here for the many reasons why.
jessmac78
Posts: 8
Joined: Tue May 05, 2020 10:06 pm

Re: [Solved] Can't Open Any Files ("Write Error")

Post by jessmac78 »

Thanks for letting me know, RoryOF! Will definitely keep that in mind!
by John_Ha » Wed May 13, 2020 11:02 am
It sound like a permissions problem - see [Tutorial] Problems with Windows Defender under Windows 10
Is this applicable to other versions of Windows? Mine is Windows 7. As far as Windows Defender goes, I have it turned off and I use Norton for antivirus protection. Could it be a permissions problem with Norton instead?
OpenOffice 4.1.1 on Windows 7
User avatar
RoryOF
Moderator
Posts: 34618
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: [Solved] Can't Open Any Files ("Write Error")

Post by RoryOF »

Yes, it could be a Norton permissions issue.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
jessmac78
Posts: 8
Joined: Tue May 05, 2020 10:06 pm

Re: [Solved] Can't Open Any Files ("Write Error")

Post by jessmac78 »

I'll look into that, then. At the moment the issue seems to have disappeared but once it (inevitably, I believe) starts up again I'll check the permissions under Norton.
OpenOffice 4.1.1 on Windows 7
Post Reply