Func Filesystem Umask
# PHP umask() Function
* * Complete PHP Filesystem Reference](#)
* * *
## Definition and Usage
The umask() function changes the file permissions.
This function sets PHP's umask to _mask_ & 0777 and returns the previous umask. However, if you call umask() without arguments, it returns the current umask.
## Syntax
umask(mask)
| Parameter | Description |
| :--- | :--- |
| mask | Optional. Specifies the new permissions. Default is 0777. The mask parameter consists of four digits: * The first digit is usually 0 * The second digit specifies permissions for the owner * The third digit specifies permissions for the owner's group * The fourth digit specifies permissions for everyone else Possible values (sum the numbers below to set multiple permissions): * 1 = execute permission * 2 = write permission * 4 = read permission |
* * Complete PHP Filesystem Reference](#)
YouTip