This is the mail archive of the
mailing list for the Cygwin project.
vim can't write /etc/hosts
- From: Frank Fesevur <ffes at users dot sourceforge dot net>
- To: "cygwin at cygwin dot com" <cygwin at cygwin dot com>
- Date: Thu, 4 Sep 2014 22:33:28 +0200
- Subject: vim can't write /etc/hosts
- Authentication-results: sourceware.org; auth=none
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
I did all this with my mintty started as administrator:
I can edit the file starting my Notepad++ as administrator and open file.
A bit surprising but this works:
# echo "# test" >> hosts
Why can't vim write the file, or even better the symlinked file? I'm
quite sure editing the symlink works in Win7, but can try tomorrow.
Problem reports: http://cygwin.com/problems.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple