# Blocked at updating host file 75%

**URL:** https://community.kinsta.com/t/blocked-at-updating-host-file-75/338
**Category:** Bug Reports
**Created:** [February 6, 2021, 1:31pm UTC](https://community.kinsta.com/t/blocked-at-updating-host-file-75/338 "2021-02-06T13:31:33Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![lena](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/lena/32/258_2.png) [@lena](https://community.kinsta.com/u/lena)
#### Post date: [February 6, 2021, 1:31pm UTC](https://community.kinsta.com/t/blocked-at-updating-host-file-75/338/1 "2021-02-06T13:31:33Z")

</div>

hello,  
all in the title.  
i done all the autorisations to write the file.  
can i change the host file myself with the code instead ?  
and what is the code ?  
thanks

---

<div class="post-metadata">

### Author: ![cphollingdale](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/cphollingdale/32/83_2.png) [@cphollingdale](https://community.kinsta.com/u/cphollingdale)
#### Post date: [February 6, 2021, 7:12pm UTC](https://community.kinsta.com/t/blocked-at-updating-host-file-75/338/2 "2021-02-06T19:12:24Z")

</div>

Dealing with the same issue, have been digging pretty far into it over here: [Can't connect to database DK0033 - #18 by cphollingdale](https://community.kinsta.com/t/cant-connect-to-database-dk0033/102/18)

---

<div class="post-metadata">

### Author: ![michael](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/michael/32/31_2.png) [@michael](https://community.kinsta.com/u/michael)
#### Post date: [February 8, 2021, 4:31pm UTC](https://community.kinsta.com/t/blocked-at-updating-host-file-75/338/3 "2021-02-08T16:31:48Z")

</div>

> [@lena](#):
>
> can i change the host file myself with the code instead ?

If you’re editing the host file yourself, it just needs the following:

```auto
127.0.0.1 website.local
127.0.0.1 www.website.local
::1 website.local
::1 www.website.local

```

The thread linked to above may provide steps that can be looked into if you’re running Windows. It’s possible that the host file is blocked on your machine from being able to edit.

---

<div class="post-metadata">

### Author: ![Lien](https://avatars.discourse-cdn.com/v4/letter/l/9fc29f/32.png) [@Lien](https://community.kinsta.com/u/Lien)
#### Post date: [February 15, 2021, 2:58pm UTC](https://community.kinsta.com/t/blocked-at-updating-host-file-75/338/4 "2021-02-15T14:58:44Z")

</div>

Hello, I’m having the same problem:

Host File update failed. DK0022  
When install a new site he’s blocked at 75%  
When retry its gives the same error.

I’m working on Windows 10 Home  
Host file read only is unchecked  
We did also some modifications in the anti-virus

With Local wp I was having the same problem, an eprm error with the host file, so I’ve switched for DevKinsta in the hope this wil work.

I am new to WordPress and want to try things out, so I love to get DevKinsta working.  
Thanks a lot

---

<div class="post-metadata">

### Author: ![jeff](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/jeff/32/16_2.png) [@jeff](https://community.kinsta.com/u/jeff)
#### Post date: [February 15, 2021, 3:05pm UTC](https://community.kinsta.com/t/blocked-at-updating-host-file-75/338/5 "2021-02-15T15:05:13Z")

</div>

Hi Lien, welcome to DevKinsta, we’re glad to have you!

Can you edit your hosts file normally with a text editor like notepad and save the changes?  
Do the changes you make stay when you open the file again?

---

<div class="post-metadata">

### Author: ![Lien](https://avatars.discourse-cdn.com/v4/letter/l/9fc29f/32.png) [@Lien](https://community.kinsta.com/u/Lien)
#### Post date: [February 15, 2021, 3:34pm UTC](https://community.kinsta.com/t/blocked-at-updating-host-file-75/338/6 "2021-02-15T15:34:13Z")

</div>

Yes,  
I’ve put the following rules as suggested above and after saving, closing, reopening they are still there.

127.0.0.1 website.local  
127.0.0.1 www.website.local  
::1 website.local  
::1 www.website.local

---

<div class="post-metadata">

### Author: ![jeff](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/jeff/32/16_2.png) [@jeff](https://community.kinsta.com/u/jeff)
#### Post date: [February 15, 2021, 3:43pm UTC](https://community.kinsta.com/t/blocked-at-updating-host-file-75/338/7 "2021-02-15T15:43:57Z")

</div>

Try this:

When you first run DevKinsta, right-click on it and click ‘run as administrator’.

 ![image](https://us1.discourse-cdn.com/flex020/uploads/kinsta/original/1X/96500311c0580dccab4784af6c6df788ac06166d.jpeg)

Let me know how that works.

---

<div class="post-metadata">

### Author: ![Lien](https://avatars.discourse-cdn.com/v4/letter/l/9fc29f/32.png) [@Lien](https://community.kinsta.com/u/Lien)
#### Post date: [February 15, 2021, 4:32pm UTC](https://community.kinsta.com/t/blocked-at-updating-host-file-75/338/8 "2021-02-15T16:32:02Z")

</div>

Still the same error

---

<div class="post-metadata">

### Author: ![Lien](https://avatars.discourse-cdn.com/v4/letter/l/9fc29f/32.png) [@Lien](https://community.kinsta.com/u/Lien)
#### Post date: [February 15, 2021, 4:44pm UTC](https://community.kinsta.com/t/blocked-at-updating-host-file-75/338/9 "2021-02-15T16:44:02Z")

</div>

When checking the host file, its was set again on read only.

I can’t reply anymore so I put it here,  
Hope You will see it

![image](https://us1.discourse-cdn.com/flex020/uploads/kinsta/original/1X/70f1dd4e05afd8be10d5cc7c604b8a7b69180004.png)

No error output.  
The Hosts file has been updated with: #### This is a test file insert

---

<div class="post-metadata">

### Author: ![jeff](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/jeff/32/16_2.png) [@jeff](https://community.kinsta.com/u/jeff)
#### Post date: [February 15, 2021, 4:56pm UTC](https://community.kinsta.com/t/blocked-at-updating-host-file-75/338/10 "2021-02-15T16:56:51Z")

</div>

Can you try opening up a privileged (ran as administrator) command prompt and run the following command?

 ![image](https://us1.discourse-cdn.com/flex020/uploads/kinsta/original/1X/1b209bd03f411bbf196ac4616ea78dd23a1224e1.png)

> echo #### This is a test file insert \>\> C:/Windows/System32/drivers/etc/hosts & echo.

That should insert a line into your hosts file or output an error we can hopefully diagnose.

---

<div class="post-metadata">

### Author: ![z1998](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/z1998/32/304_2.png) [@z1998](https://community.kinsta.com/u/z1998)
#### Post date: [February 20, 2021, 12:40pm UTC](https://community.kinsta.com/t/blocked-at-updating-host-file-75/338/11 "2021-02-20T12:40:38Z")

</div>

Hi,  
I have same problem. I echoed with CMD and got text inserted in hosts file without output of errors. ( [http://prntscr.com/101uo0y](http://prntscr.com/101uo0y) ).  
I tried to open DevKinsta with administrator privileges but same problem it stops at 75% and can’t modify hosts file. ( [http://prntscr.com/101upkf](http://prntscr.com/101upkf) ).  
I added manually what DevKinsta tries to add itself and made site accessible in browser but problem is that DevKinsta app is trying to modify hosts file and doesn’t allow clicks in the app.

---

<div class="post-metadata">

### Author: ![rafu](https://avatars.discourse-cdn.com/v4/letter/r/f14d63/32.png) [@rafu](https://community.kinsta.com/u/rafu)
#### Post date: [March 15, 2021, 2:08pm UTC](https://community.kinsta.com/t/blocked-at-updating-host-file-75/338/12 "2021-03-15T14:08:39Z")

</div>

Hi there,  
any update on this?

Have been trying to use DevKinsta for some time now, but it won’t work.  
It keeps blocking at the hosts-file edits… Manual editing and echoing into the hosts-file works.  
And I’m running everything as admin user…

Is there any way to debug this any further? A colleague of my has no trouble using DevKinsta at all.

---

<div class="post-metadata">

### Author: ![michael](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/michael/32/31_2.png) [@michael](https://community.kinsta.com/u/michael)
#### Post date: [March 15, 2021, 4:55pm UTC](https://community.kinsta.com/t/blocked-at-updating-host-file-75/338/13 "2021-03-15T16:55:50Z")

</div>

Hi @rafu . I’m sorry for the trouble here. Would you happen to have any anti-virus software running in the background that would perhaps be blocking the action?

---

<div class="post-metadata">

### Author: ![rafu](https://avatars.discourse-cdn.com/v4/letter/r/f14d63/32.png) [@rafu](https://community.kinsta.com/u/rafu)
#### Post date: [March 16, 2021, 8:48am UTC](https://community.kinsta.com/t/blocked-at-updating-host-file-75/338/14 "2021-03-16T08:48:42Z")

</div>

Hi @michael,  
just plain old Windows Defender. Is there any settings for ‘locking’ the hosts file? I couldn’t find any…

As I mentioned, editing it with Notepad++ in admin mode is no problem. Also the echoing into the host file is possible with a privileged command prompt.

---

<div class="post-metadata">

### Author: ![michael](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/michael/32/31_2.png) [@michael](https://community.kinsta.com/u/michael)
#### Post date: [March 16, 2021, 4:15pm UTC](https://community.kinsta.com/t/blocked-at-updating-host-file-75/338/15 "2021-03-16T16:15:11Z")

</div>

@rafu Would you be able to disable Windows Defender to see if that helps?

---

<div class="post-metadata">

### Author: ![rafu](https://avatars.discourse-cdn.com/v4/letter/r/f14d63/32.png) [@rafu](https://community.kinsta.com/u/rafu)
#### Post date: [March 18, 2021, 9:24am UTC](https://community.kinsta.com/t/blocked-at-updating-host-file-75/338/16 "2021-03-18T09:24:13Z")

</div>

Unfortunately no changes…

I completely disabled Windows Defender and all its components (including things like ‘tamper protection’) and also added the hosts-file to the Defender’s excluded files - still not working.

I also tried switching docker from using WLS2 to the slower Hyper-V which gave me some `Docker wants to share <some-dev-kinsta-dir>`-messages, that I haven’t seen before…  
Also, I disabled Windows UAC, but still no changes.

---

<div class="post-metadata">

### Author: ![rafu](https://avatars.discourse-cdn.com/v4/letter/r/f14d63/32.png) [@rafu](https://community.kinsta.com/u/rafu)
#### Post date: [March 22, 2021, 8:39am UTC](https://community.kinsta.com/t/blocked-at-updating-host-file-75/338/17 "2021-03-22T08:39:18Z")

</div>

@michael Do you have any idea?

---

<div class="post-metadata">

### Author: ![michael](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/michael/32/31_2.png) [@michael](https://community.kinsta.com/u/michael)
#### Post date: [March 22, 2021, 4:47pm UTC](https://community.kinsta.com/t/blocked-at-updating-host-file-75/338/18 "2021-03-22T16:47:21Z")

</div>

Hi @rafu. I’m sorry for the wait. Perhaps try [icalcs command](https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/icacls) to update the permissions of the host file.

Example:  
`icacls \Windows\System32\drivers\etc\hosts /grant YOUR_USERNAME_HERE:(OI)(CI)F /T`

Be sure to run Command Prompt in administrator mode as well:

 ![image](https://us1.discourse-cdn.com/flex020/uploads/kinsta/original/1X/db2d971d7e1d78a647e27ea869ba64b485d4f7df.png)

Let me know if that works for you.

---

<div class="post-metadata">

### Author: ![rafu](https://avatars.discourse-cdn.com/v4/letter/r/f14d63/32.png) [@rafu](https://community.kinsta.com/u/rafu)
#### Post date: [March 23, 2021, 8:53am UTC](https://community.kinsta.com/t/blocked-at-updating-host-file-75/338/19 "2021-03-23T08:53:49Z")

</div>

Hi @michael,  
I was able to run your command without the `(OI)(CI)`-flags, but unfornately, that did not do the trick for DevKinsta. Still blocking at 75%. However, I now am able to edit the `hosts`-file without admin rights (checked with Notepad++, that formerly had to be run in administrator mode to modify the `hosts`-file).

The `(OI)(CI)` flags are only available for directories only, as the link you provided documents. I tried running them on the parent-dir (the `etc`-dir), but only got an `access denied`-error. And I am also not able to edit the folders permissions via the Windows GUI-Tool. The options for allowing/denying access are disabled:  
 ![image](https://us1.discourse-cdn.com/flex020/uploads/kinsta/original/1X/919645017f863d1f46e55798dbef6559fd2985ef.png)

I’d be happy to try anything else, if you haven’t run out of ideas yet? 🙂

---

<div class="post-metadata">

### Author: ![michael](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/michael/32/31_2.png) [@michael](https://community.kinsta.com/u/michael)
#### Post date: [March 23, 2021, 4:14pm UTC](https://community.kinsta.com/t/blocked-at-updating-host-file-75/338/20 "2021-03-23T16:14:12Z")

</div>

Thank you for testing that @rafu . I’m sorry again for the issues. The developers are aware of the issue and are working on a solution. Thank you again for using DevKinsta!

[Next page](https://community.kinsta.com/t/blocked-at-updating-host-file-75/338.md?page=2)
