Files should be created with appropriate access permissions. Creating a file with insufficient file access permissions may allow unintended access to program-critical files. File permissions are heavily dependent on the underlying operating system. This recommendation offers three provides examples of how to specify access permissions for newly created files using standard C and POSIX functions.
...