Cygwin Created File – Cannot Delete

If you open permissions on file/folder and get this message:

Permissions Are Incorrectly Ordered

And if you list files in cygwin and the user:group looks like this:

You can open a cmd window with administrative privileges and then run the following command:

Manual page for the takeown.exe command.

Note Cygwin was notorious for creating folders with this issue so it may have happened if you inherited a drive with folders created by Cygwin which doesn’t have a correct maping to users on this drive.

After getting ownership you should be able to open Windows Explorer, right click on the folder, open the Security Tab and change permissions at will.