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
  • Returns the file path information pathinfo

    pathinfo

    Returnsthefilepathin
  • Write to files (safely used in binary files) fwrite

    fwrite

    Writetofiles(safelyu
  • Returns the file name part in the path basename

    basename

    Returnsthefilenamepa
  • Obtain file permissions fileperms

    fileperms

    Obtainfilepermission
  • Change the group to which the file belongs chgrp

    chgrp

    Changethegrouptowhic
  • alias for disk_free_space diskfreespace

    diskfreespace

    aliasfordisk_free_sp
  • Determine whether the given file name is a directory is_dir

    is_dir

    Determinewhethertheg
  • Set file access and modification time touch

    touch

    Setfileaccessandmodi
Popular Articles