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

FreeBSD Manual Pages

  
 
  

home | help
UMASK(2V)							     UMASK(2V)

NAME
       umask - set file	creation mode mask

SYNOPSIS
       #include	<sys/stat.h>

       int umask(mask)
       int mask;

SYSTEM V SYNOPSIS
       #include	<sys/types.h>
       #include	<sys/stat.h>

       mode_t umask(mask)
       mode_t mask;

DESCRIPTION
       umask()	sets  the process's file creation mask to mask and returns the
       previous	value of the mask.  The	low-order 9  bits  of  mask  are  used
       whenever	a file is created, clearing corresponding bits in the file ac-
       cess permissions.  (see stat(2V)).  This	clearing restricts the default
       access to a file.

       The mask	is inherited by	child processes.

RETURN VALUES
       umask() returns the previous value of the file creation mask.

SEE ALSO
       chmod(2V), mknod(2V), open(2V)

				21 January 1990			     UMASK(2V)

NAME | SYNOPSIS | SYSTEM V SYNOPSIS | DESCRIPTION | RETURN VALUES | SEE ALSO

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

home | help