Easy Tutorial
❮ Func Filesystem Is Dir Func Array Multisort ❯

PHP umask() Function



Definition and Usage

The umask() function changes the file permissions of files.

This function sets PHP's umask to mask & 0777 and returns the original umask. However, if you call umask() without parameters, it returns the current umask.

Syntax

Parameter Description
mask Optional. Specifies the new permissions. The default is 0777. The mask parameter consists of four digits: The first digit is usually 0 <br> <br> The second digit specifies the owner's permissions <br> <br> The third digit specifies the permissions of the owner's group <br> <br> The fourth digit specifies the permissions for everyone else Possible values (to set multiple permissions, sum the following numbers): 1 = execute permission <br> <br> 2 = write permission <br> <br> 4 = read permission
❮ Func Filesystem Is Dir Func Array Multisort ❯