EPERM Error - Even After uncheking read only property in hosts file

Hi, I’m getting this error: Local ran into a EPRM error when trying to update hosts file.

Reading the forum I found that a solution was to uncheck the read only property of the file. I did that but It didnt solve the problem. Can anyone help?

My Log file says this:

Apr 13, 2018, 8:01 AM GMT-3 - info: [main/docker-machine] checked IP 192.168.95.100

Apr 13, 2018, 8:01 AM GMT-3 - error: [main/hosts-helper] Could not update hosts. 
{ stdout: '', stderr: '', error: null, exitCode: 100 }
Apr 13, 2018, 8:01 AM GMT-3 - info: [main/docker-network-manager] Connected 18eb2b5e9bdf6173e95be2afdbc163184a382fdf0dce84253a14ed0bbea03c4d.
Apr 13, 2018, 8:02 AM GMT-3 - info: [main/waitForMySQL] Querying MySQL
Apr 13, 2018, 8:05 AM GMT-3 - info: [main/index] Existing Pressmatic data does not exist.
Apr 13, 2018, 8:05 AM GMT-3 - info: [main/check-system] Check System: Docker Machine:  
{ stdout: 'Stopped\n', stderr: '' }
Apr 13, 2018, 8:05 AM GMT-3 - info: [renderer/CheckEnvPage] Check system promise response: 
[ undefined, 'machine-halted' ]
Apr 13, 2018, 8:05 AM GMT-3 - info: [main/docker-machine] Checking Boot2Docker.iso hash
Apr 13, 2018, 8:05 AM GMT-3 - info: [main/docker-machine] Boot2Docker.iso hash does not match!
Apr 13, 2018, 8:05 AM GMT-3 - info: [main/docker-machine] Copying C:\Users\usuario\AppData\Local\Programs\local-by-flywheel\resources\extraResources\virtual-machine\vendor\docker\boot2docker.iso to C:\Users\usuario\.docker\machine\machines\local-by-flywheel\boot2docker.iso
Apr 13, 2018, 8:05 AM GMT-3 - info: [main/docker-machine] Running  C:\Users\usuario\AppData\Local\Programs\local-by-flywheel\resources\extraResources\virtual-machine\vendor\docker\windows\docker-machine.exe start local-by-flywheel
Apr 13, 2018, 8:05 AM GMT-3 - info: [main/docker-machine] Starting "local-by-flywheel"...
Apr 13, 2018, 8:05 AM GMT-3 - info: [main/docker-machine] (local-by-flywheel) Check network to re-create if needed...
Apr 13, 2018, 8:05 AM GMT-3 - info: [main/docker-machine] (local-by-flywheel) Waiting for an IP...
Apr 13, 2018, 8:06 AM GMT-3 - info: [main/docker-machine] Machine "local-by-flywheel" was started.
Apr 13, 2018, 8:06 AM GMT-3 - info: [main/docker-machine] Waiting for SSH to be available...
Apr 13, 2018, 8:06 AM GMT-3 - info: [main/docker-machine] Detecting the provisioner...
Apr 13, 2018, 8:06 AM GMT-3 - info: [main/docker-machine] Started machines may have new IP addresses. You may need to re-run the `docker-machine env` command.
Apr 13, 2018, 8:06 AM GMT-3 - info: [main/set-docker-env] Getting Docker Machine env.
Apr 13, 2018, 8:06 AM GMT-3 - info: [main/set-docker-env] Received Docker Machine env. export DOCKER_TLS_VERIFY="1"
export DOCKER_HOST="tcp://192.168.95.100:2376"
export DOCKER_CERT_PATH="C:\Users\usuario\.docker\machine\machines\local-by-flywheel"
export DOCKER_MACHINE_NAME="local-by-flywheel"
export COMPOSE_CONVERT_WINDOWS_PATHS="true"
# Run this command to configure your shell: 
# eval $("C:\Users\usuario\AppData\Local\Programs\local-by-flywheel\resources\extraResources\virtual-machine\vendor\docker\windows\docker-machine.exe" env --shell bash local-by-flywheel)

Apr 13, 2018, 8:06 AM GMT-3 - info: [main/docker-machine] checking IP
Apr 13, 2018, 8:06 AM GMT-3 - info: [main/set-docker-env] Getting Docker Machine env.
Apr 13, 2018, 8:06 AM GMT-3 - info: [main/docker-network-manager] maybeCreateNetwork
Apr 13, 2018, 8:06 AM GMT-3 - info: [main/docker-router] getRouterContainers()
Apr 13, 2018, 8:06 AM GMT-3 - info: [main/docker-network-manager] doesNetworkExist
Apr 13, 2018, 8:06 AM GMT-3 - info: [main/docker-router] reconnectNetwork()
Apr 13, 2018, 8:06 AM GMT-3 - info: [main/docker-router] teardown()
Apr 13, 2018, 8:06 AM GMT-3 - info: [main/docker-network-manager] Network exists.
Apr 13, 2018, 8:06 AM GMT-3 - info: [main/docker-router] Removing router container 2a6564a095b8c70c7e6bb19448537227a71f2d562146ca44cdfd1f4512439158
Apr 13, 2018, 8:06 AM GMT-3 - info: [main/docker-router] updateProxyManager()
Apr 13, 2018, 8:06 AM GMT-3 - info: [main/docker-router] runContainer()
Apr 13, 2018, 8:06 AM GMT-3 - info: [main/hosts-helper] hostsHelper: Updating hosts with 192.168.95.100 false prueba.local www.prueba.local
Apr 13, 2018, 8:06 AM GMT-3 - info: [main/set-docker-env] Received Docker Machine env. export DOCKER_TLS_VERIFY="1"
export DOCKER_HOST="tcp://192.168.95.100:2376"
export DOCKER_CERT_PATH="C:\Users\usuario\.docker\machine\machines\local-by-flywheel"
export DOCKER_MACHINE_NAME="local-by-flywheel"
export COMPOSE_CONVERT_WINDOWS_PATHS="true"
# Run this command to configure your shell: 
# eval $("C:\Users\usuario\AppData\Local\Programs\local-by-flywheel\resources\extraResources\virtual-machine\vendor\docker\windows\docker-machine.exe" env --shell bash local-by-flywheel)

Apr 13, 2018, 8:06 AM GMT-3 - info: [main/docker-machine] checked IP 192.168.95.100

Apr 13, 2018, 8:06 AM GMT-3 - error: [main/hosts-helper] Could not update hosts. 
{ stdout: '', stderr: '', error: null, exitCode: 100 }
Apr 13, 2018, 8:06 AM GMT-3 - info: [main/docker-network-manager] Connected 18eb2b5e9bdf6173e95be2afdbc163184a382fdf0dce84253a14ed0bbea03c4d.

Hi Gonzalo,

Thanks for the log file.

Considering you already removed the “Read-only” attribute on the hosts file, my guess is that it’s some type of anti-virus or internet security locking the file.

If you are running anti-virus or internet security, can you share which one(s) so we can look into the necessary steps to resolve this?

Sorry for the trouble!

Hi Clay, I’m using kaspersky total security.

Got it, thanks!

Please see My Windows PC Missing hosts entry. This site may be inaccessible

Adding to that, you can add the Window’s hosts file to the exclusions list in Kaspersky and it should resolve the issue. See https://support.kaspersky.com/12160 for details on how to add an exclusion.

Here’s the path to the file that needs to be excluded: C:\Windows\System32\drivers\etc\hosts

Thanks clay! Is working now

1 Like

Great, thanks for confirming!

I’ve went ahead and added a note about Kaspersky in Help! I’m running into an EPERM error with the hosts file on Windows.