This is the mail archive of the
mailing list for the Cygwin project.
What would it take to get Cygwin and NTFS file permissions to play nice?
- From: Thomas Taylor <tayloth at gmail dot com>
- To: cygwin at cygwin dot com
- Date: Fri, 12 Aug 2016 22:26:19 -0400
- Subject: What would it take to get Cygwin and NTFS file permissions to play nice?
- Authentication-results: sourceware.org; auth=none
I use rsync to back up my Cygwin user directories to an external USB
disk drive, formatted as NTFS. This fails from time to time, usually
due to permission failures when trying to update the destination files.
The Windows permissions of the destination files turn out to be in the
wrong order, and to contain extraneous entries. Further checking of
other files on the destination drive reveal the same problem with their
Windows permissions. Rather that try to correct the Windows permissions
of each file in turn, I go as far up the directory tree as needed, and
recursively reset all Windows file permissions all the way down. When I
then rsync the USB drive back to my user directories, the UNIX
permissions of every file are now set to executable. This has the
unfortunate effect of granting execute permission on every file
restored, even those that are not executable. I gave up on correcting
the permissions of the restored files (via a long-running recursive
script), and learned to live with the problem. Until now, that is. I
thought I'd try "ls --color", and was disappointed to find that almost
everything (except directories and symbolic links) came out light green.
This happened because almost everything was marked as executable, and
this happened because rsync mangled the Windows permissions, which are
most easily reset to be the same on all files in a given directory and
all subdirectories. These Windows permissions inevitably involve "Full
Control" (including execute permission) for somebody, especially the
owner. Yeah, I've read the Cygwin doc on this, and I get the feeling
that solving it is too difficult/impossible/not worth the effort. For
starters, could we at least set the Windows permissions in proper order?
Problem reports: http://cygwin.com/problems.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple