The umask() function changes the file permissions of a file.
This function sets the PHP umask to mask & 0777 and returns the original umask. However, if you call umask() without arguments, the current umask is returned.
umask(mask)
parameter | describe |
---|---|
mask | Optional. Specify new permissions. The default is 0777. The mask parameter consists of four numbers: The first number is usually 0 The second number specifies the owner's permissions The third number specifies the permissions of the user group to which the owner belongs The fourth number specifies everyone else's permissions Possible values (to set multiple permissions, total the numbers below): 1 = execute permission 2 = write permission 4 = Read permission |