If you run cygwin applications such as [the rsync-backup script](/2014/01/31/incremental-backups-with-rsync-in-windows/), you will sometimes run into trouble with odd NTFS permissions being set by the cygwin application. My tip is to avoid this by making cygwin not set *any* permissions at all. If a cygwin application then creates a file, for instance, this file will only inherit its security settings from the folder it is contained in. This way, you can set access control on the root directory and all the files created by rsync inside that folder will inherit these permissions. How to do it? Open your cygwin shell and edit /etc/fstab which should contain only one non-comment line:
none /cygdrive cygdrive binary,posix=0,user 0 0
Now insert the noacl attribute, see [the cygwin manual](http://www.cygwin.com/cygwin-ug-net/using.html#mount-table):
none /cygdrive cygdrive binary,noacl,posix=0,user 0 0
And the next time you run rsync-backup, it will *not* set all kinds of awkward permissions on your files which make them unreadable on a freshly installed computer. Just saying.


I have a folder data with stuff in it. I am not using an Administrator account on my Windows machine, and that folder is supposed to be owned by my user. When you search for how to take ownership of all files and folders in a certain directory recursively, you get told to use TAKEOWN, a lot. Well, it has a little catch: You can only really use it to take ownership. Not to give it. A much more giving command is
ICACLS C:\data /setowner rattle /T
Oh yea, it's the /T switch that makes it recursive.