1PAM_UMASK(8)                   Linux-PAM Manual                   PAM_UMASK(8)
2
3
4

NAME

6       pam_umask - PAM module to set the file mode creation mask
7

SYNOPSIS

9       pam_umask.so [debug] [silent] [usergroups] [umask=mask]
10

DESCRIPTION

12       pam_umask is a PAM module to set the file mode creation mask of the
13       current environment. The umask affects the default permissions assigned
14       to newly created files.
15
16       The PAM module tries to get the umask value from the following places
17       in the following order:
18
19       ·   umask= entry in the user's GECOS field
20
21       ·   umask= argument
22
23       ·   UMASK entry from /etc/login.defs
24
25       ·   UMASK= entry from /etc/default/login
26
27       The GECOS field is split on comma ',' characters. The module also in
28       addition to the umask= entry recognizes pri= entry, which sets the nice
29       priority value for the session, and ulimit= entry, which sets the
30       maximum size of files the processes in the session can create.
31

OPTIONS

33       debug
34           Print debug information.
35
36       silent
37           Don't print informative messages.
38
39       usergroups
40           If the user is not root and the username is the same as primary
41           group name, the umask group bits are set to be the same as owner
42           bits (examples: 022 -> 002, 077 -> 007).
43
44       umask=mask
45           Sets the calling process's file mode creation mask (umask) to mask
46           & 0777. The value is interpreted as Octal.
47

MODULE TYPES PROVIDED

49       Only the session type is provided.
50

RETURN VALUES

52       PAM_SUCCESS
53           The new umask was set successfully.
54
55       PAM_SERVICE_ERR
56           No username was given.
57
58       PAM_USER_UNKNOWN
59           User not known.
60

EXAMPLES

62       Add the following line to /etc/pam.d/login to set the user specific
63       umask at login:
64
65                   session optional pam_umask.so umask=0022
66
67
68

SEE ALSO

70       pam.conf(5), pam.d(5), pam(8)
71

AUTHOR

73       pam_umask was written by Thorsten Kukuk <kukuk@thkukuk.de>.
74
75
76
77Linux-PAM Manual                  05/18/2018                      PAM_UMASK(8)
Impressum