2

It appears that on Windows 7 Cygwin/vim thinks all files are read only. You can edit the files fine in Textpad/Notepad but vim thinks they are read only. There are number of reported occurrences but I can't see a solution. ??


Update: Per accepted answer, created the file C:\cygwin\etc\fstab.d\myname with the entry below.

none /cygdrive cygdrive binary,posix=0,user 0 0,acl

Per the comment you'll see in C:\cygwin\etc\fstab, this statement is the default Cygwin mount, save for the acl which I added.

Marcus Leon
  • 55,199
  • 118
  • 297
  • 429
  • 2
    @MatthewWilson +1 for correct order. In addition, I have to use `none /cygdrive cygdrive binary,posix=0,user,noacl 0 0` on Windows 8. – Ye Liu Dec 18 '12 at 18:43
  • Even if i use Windows 7, i've had to add the `noacl` Option to get write access to my files. – jrast Feb 04 '13 at 21:55

2 Answers2

3

Cygwin tries to impose a POSIX compatibility layer over the windows access control lists, which often leads to many problems.

In older versions of Cygwin a cheap solution was to disable this POSIX compatibility layer by setting the environment variable "CYGWIN=ntsec". Nowadays it seems as one must set the "acl" option for your drive(s).

http://www.cygwin.com/cygwin-ug-net/using.html#mount-table

This has some drawbacks. If you try to run a secured cygwin installation for multiple users, then better use a real linux, this will save so much hassle.

Markus Kull
  • 1,471
  • 13
  • 16
3

I guess another solution would be to use the native version of Vim instead of the cygwin one.

Luc Hermitte
  • 31,979
  • 7
  • 69
  • 83