Cygwin / vim的Windows 7文件访问问题 [英] Cygwin/vim Windows 7 file access issue

查看:102
本文介绍了Cygwin / vim的Windows 7文件访问问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

似乎在Windows 7上Cygwin / vim认为所有文件都是只读的。您可以在Textpad / Notepad中编辑文件,但vim认为它们是只读的。有多个 次出现,但我看不到解决方案。 :接受答案,创建文件 C:\cygwin\etc\fstab.d\myname 与下面的条目。

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

根据 C:\cygwin\etc\fstab ,此语句是默认的Cygwin挂载,保存为 acl ,我添加了

解决方案

Cygwin尝试在Windows访问控制列表上施加POSIX兼容层,这往往导致许多问题。



在早期版本的Cygwin中,一个便宜的解决方案是通过设置环境变量CYGWIN = ntsec禁用此POSIX兼容层。现在似乎必须为您的驱动器设置acl选项。



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



这有一些缺点。如果你试图为多个用户运行安全的cygwin安装,那么最好使用一个真正的linux,这将节省这么多的麻烦。


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.

解决方案

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.

这篇关于Cygwin / vim的Windows 7文件访问问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆