问题描述
我有一个文件夹/ cygwin / d / myfolder /
每次我保存文件,从cygwin如果我做一个ls -la我看到这些文件被赋予权限000.这实际上导致我一个bit的问题,因为我rsync这个文件夹到我的服务器,没有一个文件是可访问的。如何获取文件以自动获得合理的权限?
I have a folder /cygwin/d/myfolder/And everytime I save files there, from cygwin if i do an ls -la I see that the files are given permission 000. That actually causes me quite a bit of problem as I rsync this folder to my server and none of the files are accessible. How can I get the files to automatically get a reasonable permission?
推荐答案
阅读此链接的答案:
我还:
编辑 / etc / fstab ,并在文件末尾添加此行:
Edit /etc/fstab and add this line at the end of the file:
none /cygdrive cygdrive binary,noacl,posix=0,user 0 0
然后关闭所有Cygwin进程,再次打开一个新终端和ls -l。
Then close all Cygwin processes, open a new terminal and ls -l on your files again.
说明:
默认情况下,Cygwin使用文件系统的访问控制列表(ACL)来实现真正的POSIX权限。一些Windows本地程序或进程可以创建或修改ACL,使Cygwin将POSIX权限计算为000.使用 noacl 装载选项,Cygwin将忽略文件系统ACL,并仅基于DOS只读属性。
Explanation:By default, Cygwin uses the filesystem's access control lists (ACLs) to implement real POSIX permissions. Some Windows-native program or process may create or modify the ACLs such that Cygwin computes the POSIX permissions as 000. With the noacl mount option, Cygwin ignores filesystem ACLs and only fakes a subset of permission bits based on the DOS readonly attribute.
这篇关于cygwin将文件权限设置为000的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!