This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: vim can't write /etc/hosts


2014-09-05 4:33 GMT+02:00 Darik Horn:
> On Thu, Sep 4, 2014 at 4:33 PM, Frank Fesevur wrote:
>>
>> 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.
>
> Starting "C:\Cygwin\bin\mintty.exe" through a "Run As Administrator"
> context doesn't produce an elevated bash prompt on my Windows 8
> workstation.
>
> Starting the "Command Prompt (Admin)" shortcut instead and running
> "C:\Cygwin\bin\bash.exe --login" inside should give you the expected
> behavior.

There is no difference (for me) between starting mintty or cmd as administrator.

With Win7 it *has* worked but not anymore. This method is *the* way
for me to change the hosts file, because of the short path.

"nano /etc/hosts" works without a problem on both Win7 and Win2012R2
(no Win81 at the office). The described echo command works fine. So
write access should not be the problem.

Only vim has these problems with the hosts file.

I don't know if it is relevant, but I've added noacl to the /cygdrive
entry of my fstab.

Regards,
Frank

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]