I am running a (complex) script that seems to modify at some point a file. I would like to get warnings whenever the script / program tries to write, chmod, chown or perform any other attempt that I disapprove of. I want the program to have normal access to the rest of the filesystem.
Denying access is one solution, but since I have to run the script as root, it won't work. The script could override any access control settings. Even if I could run the script as non-root, the script could decide to take a different branch on access failure. That's why I prefer a warning-on-access instead of an access denial. Is there a solution (e.g. SE Linux)?