cygwin sets file permission to 000

Check to make sure that your umask is set correctly with the umask command. If your umask is say 0777 that subtracts from the permissions of new files and will end up with 000 permissions. There's probably several other possibilities to consider beyond that.

If your id is not set up correctly in /etc/passwd and /etc/group that can also cause ls to show unexpected results. Check the permissions of the folder. Also check the Windows permissions with the getfacl command. Maybe also check the mount command.


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.

Tags:

Cygwin