cygwin sets file permission to 000

前端 未结 4 748
时光取名叫无心
时光取名叫无心 2020-11-30 19:56

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 qu

4条回答
  •  眼角桃花
    2020-11-30 20:14

    Have a read through the answers at this link: http://cygwin.1069669.n5.nabble.com/vim-and-file-permissions-on-Windows-7-td61390.html

    The solution there worked for me also:

    Edit /etc/fstab and add this line at the end of the file:

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

    Then close all Cygwin processes, open a new terminal and ls -l on your files again.

    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.

提交回复
热议问题