Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

cygwin sets file permission to 000

Tags:

cygwin

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?

like image 363
user391986 Avatar asked Apr 29 '11 04:04

user391986


People also ask

How do I fix Permission denied in Cygwin?

The fix was to set the shortcut to "Run as Administrator". If you are using this method to access your Cygwin environment, go to the properties of the shortcut, select the Advanced button to get the options to "Run as Administrator", check the box, click Ok. And off you go!!

What is set permission 777?

777 is a permission in Unix based system with full read/write/execute permission to owner, group and everyone.. in general we give this permission to assets which are not much needed to be hidden from public on a web server, for example images..


1 Answers

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.

like image 163
Ed Randall Avatar answered Dec 03 '22 13:12

Ed Randall