How about an encrypted file system? You need a password to work on the files.
This is a far more sensible approach. We had this long ago at Los Alamos National Labs (NM, USA) where security followed Orange book B requirements. That is FAR more stringent than anything you can afford to implement.
What you are doing is probably ill-conceived, and motivations are good, but Don Cragun was too polite to say that.
consider this free toolkit for Linux, other OS software exists, too:
Filesystem Encryption Tools for Linux
The probability of you getting this requirement to work is low, and getting it to work flawlessly is very low, IMO. It has to be done at a very low level (kernel mode or in filesystem drivers), not with shell scripts. The probability is high that you will irreversibly damage files. And if accidentally you do that to system files, you lose the whole system. If you do proceed with your shell script approach, be very scrupulous about backing up files, because you will definitely have problems.
Just my opinion, trying to prevent big problems for you. Not trying to squash innovation.