1PAM_UMASK(8) Linux-PAM Manual PAM_UMASK(8)
2
3
4
6 pam_umask - PAM module to set the file mode creation mask
7
9 pam_umask.so [debug] [silent] [usergroups] [nousergroups] [umask=mask]
10
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
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 nousergroups
45 This is the direct opposite of the usergroups option described
46 above, which can be useful in case pam_umask has been compiled with
47 usergroups enabled by default and you want to disable it at
48 runtime.
49
50 umask=mask
51 Sets the calling process's file mode creation mask (umask) to mask
52 & 0777. The value is interpreted as Octal.
53
55 Only the session type is provided.
56
58 PAM_SUCCESS
59 The new umask was set successfully.
60
61 PAM_BUF_ERR
62 Memory buffer error.
63
64 PAM_CONV_ERR
65 The conversation method supplied by the application failed to
66 obtain the username.
67
68 PAM_INCOMPLETE
69 The conversation method supplied by the application returned
70 PAM_CONV_AGAIN.
71
72 PAM_SERVICE_ERR
73 No username was given.
74
75 PAM_USER_UNKNOWN
76 User not known.
77
79 Add the following line to /etc/pam.d/login to set the user specific
80 umask at login:
81
82 session optional pam_umask.so umask=0022
83
84
85
87 pam.conf(5), pam.d(5), pam(8)
88
90 pam_umask was written by Thorsten Kukuk <kukuk@thkukuk.de>.
91
92
93
94Linux-PAM Manual 09/03/2021 PAM_UMASK(8)