Bitcoin Forum

Bitcoin => Bitcoin Technical Support => Topic started by: BlackHatCoiner on July 19, 2020, 06:58:58 PM



Title: "Error opening file for writing:"
Post by: BlackHatCoiner on July 19, 2020, 06:58:58 PM
Hi, I'm trying to install v0.20.0 but this is what it returns me:

https://i.imgur.com/H7K4ZNG.png

What's the solution?


Title: Re: "Error opening file for writing:"
Post by: jackg on July 19, 2020, 07:06:18 PM
How much space do you have left on the drive. Can you access that folder yourself? Have you tried clicking retry also?

For people to help you it'd:
1. Be a good idea to list your OS version and type.) ie Windows 10 premium/enterprise with last update kb56782 (random letters).
2. Check the contents of that folder to see if anythings already been made. Potentially if the bitcoin-cli and bitcoind binaries have been built.


Title: Re: "Error opening file for writing:"
Post by: hosseinimr93 on July 19, 2020, 07:41:57 PM
The problem is probably from security permissions you have. It might be helpful to run the file as administrator.

A quick google search gave me the following link.
Error opening file for writing (https://windowsreport.com/error-opening-file-for-writing/)


Title: Re: "Error opening file for writing:"
Post by: joniboini on July 20, 2020, 05:30:11 AM
Check the event viewer for more details. If you have any anvir that uses real-time protection, it might be worth mentioning it too, as most of the time when you run an installer Windows will ask you permission, so anvir might be the culprit.


Title: Re: "Error opening file for writing:"
Post by: BlackHatCoiner on July 20, 2020, 06:05:52 AM
Check the event viewer for more details. If you have any anvir that uses real-time protection, it might be worth mentioning it too, as most of the time when you run an installer Windows will ask you permission, so anvir might be the culprit.

I'm using ESET NOD32. What exactly should I see on event viewer?

https://i.imgur.com/no6OG2I.png


Title: Re: "Error opening file for writing:"
Post by: nc50lc on July 20, 2020, 06:46:30 AM
-snip- so anvir might be the culprit.
I'm using ESET NOD32.
Your "HIPS" rules (reference (https://help.eset.com/eav/13/en-US/idh_hips_editor_main.html?idh_hips_editor_single_rule.html)) might have been preventing any application/installer from changing files in your system storage.
You might need to add some folder or file exceptions.

Remember you other thread about the bitcoin.conf file? (/index.php?topic=5262146.msg54824582 (https://bitcointalk.org/index.php?topic=5262146.msg54824582))
I have found out that you'll get that error if the file is read-only, similar when the app doesn't have write access to a file.


Title: Re: "Error opening file for writing:"
Post by: BlackHatCoiner on July 20, 2020, 10:34:35 AM
-snip- so anvir might be the culprit.
I'm using ESET NOD32.
Your "HIPS" rules (reference (https://help.eset.com/eav/13/en-US/idh_hips_editor_main.html?idh_hips_editor_single_rule.html)) might have been preventing any application/installer from changing files in your system storage.
You might need to add some folder or file exceptions.

Remember you other thread about the bitcoin.conf file? (/index.php?topic=5262146.msg54824582 (https://bitcointalk.org/index.php?topic=5262146.msg54824582))
I have found out that you'll get that error if the file is read-only, similar when the app doesn't have write access to a file.

I disabled HIPS. Still get the error. The issue on the other thread is from another laptop.


Title: Re: "Error opening file for writing:"
Post by: nc50lc on July 21, 2020, 01:57:17 AM
I disabled HIPS. Still get the error. The issue on the other thread is from another laptop.
It's a permission issue then.
Have you tried to run the application installer as administrator as suggested by hosseinimr93 above?


Title: Re: "Error opening file for writing:"
Post by: joniboini on July 21, 2020, 10:51:35 AM
What exactly should I see on event viewer?

Anything related to the bitcoin exe app error. I also believe this is permission issue even though most of the time Windows will ask for permission if you run an installer. Maybe something screw that up.

What happens if you install it on a different drive? Got the same error?


Title: Re: "Error opening file for writing:"
Post by: HCP on July 23, 2020, 10:31:46 PM
I would concur that it is most likely a "permissions" error of some description... Caused by either an antivirus/antimalware app preventing writing to the system drive... or Windows Security settings doing the same.

Two questions:

1. Are you running the installer as Administrator? ie. right click -> "Run as administrator"? ???
2. If you already have Bitcoin Core on the PC, did you shutdown Bitcoin Core before attempting to install/update? ???