Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
UMASK(2)		      System Calls Manual		      UMASK(2)

NAME
       umask - set file	creation mode mask

SYNOPSIS
       umask(complmode)

DESCRIPTION
       Umask  sets  a  mask  used  whenever  a	file is	created	by creat(2) or
       mknod(2): the actual mode (see chmod(2))	of the newly-created  file  is
       the  logical  AND of the	given mode and the complement of the argument.
       Only the	low-order 9 bits of the	mask (the  protection  bits)  partici-
       pate.   In  other  words, the mask shows	the bits to be turned off when
       files are created.  The mask is	inherited  by  child  processes.   The
       value is	initially 0 (this is a system configuration parameter).

RETURN VALUE
       The previous value of the mask is returned by the call.

SEE ALSO
       chmod(2), creat(2), mknod(2)

ASSEMBLER
       (umask =	60.)
       sys umask; complmode

								      UMASK(2)

NAME | SYNOPSIS | DESCRIPTION | RETURN VALUE | SEE ALSO | ASSEMBLER

Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=umask&sektion=2&manpath=2.9.1+BSD>

home | help