'How was a standard windows 7 user able to delete files under C:\Program Files?

In c++, the DeleteFile() function shouldn't allow standard users to delete files under C:\Program Files, but someone running the program was able to do this!

How is this possible??

Under Properties | Security for C:\Program Files, none of entries have write or modify access.



Solution 1:[1]

Found the cause: An intervening folder between C:\Program Files and the folder standard users could change had DIFFERENT permissions, which were inherited. Mystery solved.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 UserX