Obviously, OS-based file permissions are beyond the control of the programmer. However, it is encumbent upon the developer to open each file with the permissions needed and to close it as soon after using it as practicable. While this security policy must obviously be weighed against runtime efficiency, the best way to do this is to cluster one's file access as much as possible -- using periodic caching of small files or snippets of larger files in RAM as necessary.



