Cannot Save Files "C:\Windows\System32\drivers\etc\hosts___jb_bak___ (Access is denied)"

I'm getting a strange error in PHPStorm 9 on Windows 10:


     Cannot Save Files
     Following errors occured on attempt to save files:
     C:\Windows\System32\drivers\etc\hosts___jb_bak___ (Access is denied)

Windows 10 and PHPStorm 9 are both new on this machine.

Additionally, I don't know if any plugins might be contributing.

It happens:

  • as soon as I save the hosts file
  • when I save other files
  • every time I focus another application
  • even after the hosts file as been closed


The only way to stop it is to restart PHPStorm.

Cheers,
Dave

4 comments

Do you try editing hosts file in PHPStorm? Editing this file requires elevated permissions, you won't be able to do this unless PHPStorm is run as administrator. See http://www.sysprobs.com/how-to-edit-host-file-in-windows-8-1-8 for some hints

0

Thanks Elena, I figured this after posting :)

What's with PHPStorm hanging on to the files though?

0

make sure to close the file in PHPStorm and restart - is the error still there? Please invalidate caches (File/Invalidate caches, restart) then, to make sure this file is not in VFS caches

0

As mentioned, it stops after a restart, but I was mentioning this as it's undesirable behaviour before that.

0

Please sign in to leave a comment.