Current Location: Home> Function Categories> umask

umask

Change the current umask
Name:umask
Category:File system
Programming Language:php
One-line Description:Change file permissions.

Definition and usage

umask() function changes the current umask.

umask() sets PHP's umask to mask & 0777 and returns to the original umask. When PHP is used as a server module, umask is restored after each request is completed.

Calling umask() without parameters will return the current umask.

grammar

 umask ( mask )
parameter describe
mask Required. Specify new permissions. The default is 0777.
Similar Functions
  • Truncate the file to a given length ftruncate

    ftruncate

    Truncatethefiletoagi
  • Synchronize changes to files (including metadata) fsync

    fsync

    Synchronizechangesto
  • Parse a configuration file parse_ini_file

    parse_ini_file

    Parseaconfigurationf
  • Read a line from a file pointer fgets

    fgets

    Readalinefromafilepo
  • Get file modification time filemtime

    filemtime

    Getfilemodificationt
  • Find file paths that match patterns glob

    glob

    Findfilepathsthatmat
  • Read characters from file pointer fgetc

    fgetc

    Readcharactersfromfi
  • Get the inode modification time of the file filectime

    filectime

    Gettheinodemodificat
Popular Articles