Problems reading or listing certain files in Windows directory

I've built my own application that searches for files and have set it to run as
administrator, however it won't read/detect most of the sys files in
c:\windows\system32\drivers. I did some checking and most cygwin EXEs
also have the same problem.

For example, if I cd to that directory and do a "dir" I see all the files (334 files).
However, if I do an "ls" (cygwin ls.exe) it only lists 10 files. So I think it's the
same problem.

I have turned off all the file hiding options in explorer and the files show up there.
I don't want to modify these files or their permissions, just list them and read them.

When I look at the effective permissions tab for these sys files, it says that
Administrator DOES have read and list permission, though they are owned
by TrustedInstaller.

Is this WFP (windows file protection)? When I researched WFP it said it only
protected against modifications to files, not reading them.

It seems like Windows 7 is letting only microsoft EXEs read these files, but all other
EXEs, even if being run by administrator, are denied. (Another example, cygwin

Anyone know what's going on here?

I have the same problem. It must be a Cygwin bug.

This website is not affiliated, owned, or endorsed by Microsoft Corporation. It is a member of the Microsoft Partner Program.