UMASK(2) BSD System Calls Manual UMASK(2)NAME
umask -- set file creation mode mask
SYNOPSIS
#include <sys/stat.h>
mode_t
umask(mode_t cmask);
DESCRIPTION
The umask() routine sets the process's file mode creation mask to cmask and returns the previous value of the mask. The 9 low-order access
permission bits of cmask are used by system calls, including open(2), mkdir(2), mkfifo(2), and mknod(2) to turn off corresponding bits
requested in file mode. (See chmod(2)). This clearing allows each user to restrict the default access to his files.
The default mask value is S_IWGRP | S_IWOTH (022, write access for the owner only). Child processes inherit the mask of the calling process.
RETURN VALUES
The previous value of the file mode mask is returned by the call.
ERRORS
The umask() function is always successful.
LEGACY SYNOPSIS
#include <sys/types.h>
#include <sys/stat.h>
The include file <sys/types.h> is necessary.
SEE ALSO chmod(2), mkdir(2), mkfifo(2), mknod(2), open(2), compat(5)STANDARDS
The umask() function call is expected to conform to IEEE Std 1003.1-1988 (``POSIX.1'').
4th Berkeley Distribution June 4, 1993 4th Berkeley Distribution
Check Out this Related Man Page
umask(2) System Calls umask(2)NAME
umask - set and get file creation mask
SYNOPSIS
#include <sys/types.h>
#include <sys/stat.h>
mode_t umask(mode_t cmask);
DESCRIPTION
The umask() function sets the process's file mode creation mask to cmask and returns the previous value of the mask. Only the access per-
mission bits of cmask and the file mode creation mask are used. The mask is inherited by child processes. See Intro(2) for more information
on masks.
RETURN VALUES
The previous value of the file mode creation mask is returned.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Interface Stability |Standard |
+-----------------------------+-----------------------------+
|MT-Level |Async-Signal-Safe |
+-----------------------------+-----------------------------+
SEE ALSO mkdir(1), sh(1), Intro(2), chmod(2), creat(2), mknod(2), open(2), stat.h(3HEAD), attributes(5), standards(5)SunOS 5.11 28 Dec 1996 umask(2)
Working out of AIX 4.3's .
have machine (a) and machine (b)
umask on both machines is 'umask 022'.
as user root (these are trivial machines hence dummies like me have root access) when i Ftp files from a to b , why is it that I loose the original file permissions. After the ftp I have to chmod... (1 Reply)
Hi,
Do you know if it's possible to have the user list with their umask on AIX system ?
I need to check if they are OK but with smit and user by user, it will take all the day. :)
An idea ?
Thx a lot. (3 Replies)
Hi All,
I am trying to ftp a file :
-rw-rw-rw- 1 oraclepbdw dba filename.txt
from Machine A ( where umask is 022) to Machine B (umask 022)
but the file changes to
-rw-rw-r-- 1 ftpamle3 ftaml filename.txt
Dur some constraints the group of the users on either side... (3 Replies)
How can we set the Sticky bit in the umask itself. Please help me :confused:
I tried to set like umask 1000 but when I run umask, the value of umask is 00 (0 Replies)
Hi all,
The configuration:
We are useing a HP-UX Server with vxfs File System. The files on this server have normally a umask of 022 (owned by a administrative account) users who have write access to certain files get custom ACL entries that add these rights for the specific user.
Now a... (0 Replies)