Blog Details

RoiGap > Blog > Uncategorized > umask


To set permissions on top of System Default permissions.
It cannot grant additional permissions than specified by the System default permission set. To add such additional permissions, use chmod() instead.

On multi-threaded systems, this might result in varied behavior as the umask permissions are used throughout the system.
Avoid assigning relaxed permissions to newly created files on the web server and then manually updating those permissions with a chmod(). umask will change the permissions at the process level. There is one possibility that an attacking script might open this file as soon as it is created.