> From: Wim Vervoorn <wverv****@eltan*****> > Date: Thu, 27 Jun 2019 09:39:17 +0000 > > I am running both mingw and Cygwin on my Windows 8 system. > > My problem is that if I have a file that reports file mode 755 on Cygwin it reports 644 on MinGW. This is > causing problems in some cases. > > Is there a way to configure MinGW to report the same file mode as Cygwin? You will have to do that in your own application code, or write replacements for library functions (like 'stat' and 'fstat'), because MinGW uses functions from the Microsoft Windows runtime (MSVCRT.DLL), which can only report Read and Write mode bits. And even these two bits aren't synchronized with NTFS Security descriptors of the files, so you could have a file that appears to be writable, but if you try to actually write, you will get an error. > I assume this has to do with the method used by Cygwin to map the execute permission as this is not part of > NTFS by default. Cygwin uses NTFS Security features to access those bits, whereas the MSVCRT emulation of Posix 'stat' doesn't. It has nothing to do with NTFS, it's just that the Posix emulation on Windows is very rudimentary.