Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

mkdir(1)

mknod(1M)

sh(1)

chmod(2)

creat(2)

mknod(2)

open(2)

UMASK(2)  —  HP-UX

NAME

umask − set and get file creation mask

SYNOPSIS

int umask (cmask)
int cmask;

DESCRIPTION

Umask sets the process’s file mode creation mask to cmask and returns the previous value of the mask.  Only the low-order 9 bits of cmask and the file mode creation mask are used. 

The bits that are set in cmask specify which permission bits to turn off in the mode of the created file.  For example, suppose a value of 007 is specified for cmask.  Then, if a file is normally created with permissions of 0777, its mode after creation would be 0770. 

RETURN VALUE

The previous value of the file mode creation mask is returned. 

SEE ALSO

mkdir(1), mknod(1M), sh(1), chmod(2), creat(2), mknod(2), open(2). 

Hewlett-Packard Company  —  Version B.1,  May 11, 2021

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026