This is the mail archive of the
mailing list for the Cygwin project.
Re: vim can't write /etc/hosts
- From: Andrey Repin <anrdaemon at yandex dot ru>
- To: Frank Fesevur <ffes at users dot sourceforge dot net>, cygwin at cygwin dot com
- Date: Sun, 7 Sep 2014 19:00:48 +0400
- Subject: Re: vim can't write /etc/hosts
- Authentication-results: sourceware.org; auth=none
- References: <CAKf2h5SeYQ_Gg0u7ERH6ejZoXDwbPEB_ngpLzUO3qEexJYb0tA at mail dot gmail dot com>
- Reply-to: cygwin at cygwin dot com
Greetings, Frank Fesevur!
> On my Win81 machine I tried to edit /etc/hosts with vim. When I try to
> write the file I get this error:
> "/etc/hosts" E166: Can't open linked file for writing
> Since /etc/hosts is a symlink to
> /cygdrive/c/windows/System32/drivers/etc/hosts so I tried to edit the
> file with the full path but that fails as well:
> "/cygdrive/c/windows/System32/drivers/etc/hosts" E212: Can't open file
> for writing
Adding to what other people said, most self-respecting antivirus applications
explicitly block access to system hosts file.
For obvious reasons.
If you absolutely NEED to modify it, and can't resolve your issues in any
other way, disable hosts file protection first.
Andrey Repin (email@example.com) 07.09.2014, <18:58>
Sorry for my terrible english...
Problem reports: http://cygwin.com/problems.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple