213 lines
4.0 KiB
HTML
213 lines
4.0 KiB
HTML
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<HTML><HEAD><TITLE>Man page of PAM_UMASK</TITLE>
|
|
</HEAD><BODY>
|
|
<H1>PAM_UMASK</H1>
|
|
Section: Linux-PAM Manual (8)<BR>Updated: 05/18/2018<BR><A HREF="#index">Index</A>
|
|
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<A NAME="lbAB"> </A>
|
|
<H2>NAME</H2>
|
|
|
|
pam_umask - PAM module to set the file mode creation mask
|
|
<A NAME="lbAC"> </A>
|
|
<H2>SYNOPSIS</H2>
|
|
|
|
<DL COMPACT>
|
|
<DT id="1">
|
|
<B>pam_umask.so</B> [debug] [silent] [usergroups] [umask=<I>mask</I>]
|
|
</DL>
|
|
<A NAME="lbAD"> </A>
|
|
<H2>DESCRIPTION</H2>
|
|
|
|
<P>
|
|
|
|
<DD>pam_umask is a PAM module to set the file mode creation mask of the current environment. The umask affects the default permissions assigned to newly created files.
|
|
<P>
|
|
|
|
The PAM module tries to get the umask value from the following places in the following order:
|
|
<P>
|
|
<DL COMPACT><DT id="2"><DD>
|
|
•
|
|
|
|
|
|
umask= entry in the user's GECOS field
|
|
</DL>
|
|
|
|
<P>
|
|
<DL COMPACT><DT id="3"><DD>
|
|
•
|
|
|
|
|
|
umask= argument
|
|
</DL>
|
|
|
|
<P>
|
|
<DL COMPACT><DT id="4"><DD>
|
|
•
|
|
|
|
|
|
UMASK entry from /etc/login.defs (influenced by USERGROUPS_ENAB in /etc/login.defs)
|
|
</DL>
|
|
|
|
<P>
|
|
<DL COMPACT><DT id="5"><DD>
|
|
•
|
|
|
|
|
|
UMASK= entry from /etc/default/login
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
The GECOS field is split on comma ',' characters. The module also in addition to the umask= entry recognizes pri= entry, which sets the nice priority value for the session, and ulimit= entry, which sets the maximum size of files the processes in the session can create.
|
|
<A NAME="lbAE"> </A>
|
|
<H2>OPTIONS</H2>
|
|
|
|
<P>
|
|
|
|
<P>
|
|
|
|
<B>debug</B>
|
|
<DL COMPACT><DT id="6"><DD>
|
|
Print debug information.
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
<B>silent</B>
|
|
<DL COMPACT><DT id="7"><DD>
|
|
Don't print informative messages.
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
<B>usergroups</B>
|
|
<DL COMPACT><DT id="8"><DD>
|
|
If the user is not root and the username is the same as primary group name, the umask group bits are set to be the same as owner bits (examples: 022 -> 002, 077 -> 007). Note that using this option explicitly is discouraged. pam_umask enables this functionality by default if /etc/login.defs enables USERGROUPS_ENAB, and the umask is not set explicitly in other places than /etc/login.defs (this is compatible with login's behaviour without PAM).
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
<B>umask=</B><B></B><I>mask</I>
|
|
<DL COMPACT><DT id="9"><DD>
|
|
Sets the calling process's file mode creation mask (umask) to
|
|
<B>mask</B>
|
|
& 0777. The value is interpreted as Octal.
|
|
</DL>
|
|
|
|
<A NAME="lbAF"> </A>
|
|
<H2>MODULE TYPES PROVIDED</H2>
|
|
|
|
<P>
|
|
|
|
Only the
|
|
<B>session</B>
|
|
type is provided.
|
|
<A NAME="lbAG"> </A>
|
|
<H2>RETURN VALUES</H2>
|
|
|
|
<P>
|
|
|
|
<P>
|
|
|
|
PAM_SUCCESS
|
|
<DL COMPACT><DT id="10"><DD>
|
|
The new umask was set successfully.
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
PAM_SERVICE_ERR
|
|
<DL COMPACT><DT id="11"><DD>
|
|
No username was given.
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
PAM_USER_UNKNOWN
|
|
<DL COMPACT><DT id="12"><DD>
|
|
User not known.
|
|
</DL>
|
|
|
|
<A NAME="lbAH"> </A>
|
|
<H2>EXAMPLES</H2>
|
|
|
|
<P>
|
|
|
|
Add the following line to
|
|
/etc/pam.d/login
|
|
to set the user specific umask at login:
|
|
<P>
|
|
<DL COMPACT><DT id="13"><DD>
|
|
|
|
|
|
|
|
<PRE>
|
|
session optional pam_umask.so umask=0022
|
|
|
|
</PRE>
|
|
|
|
</DL>
|
|
|
|
|
|
|
|
|
|
<P>
|
|
<A NAME="lbAI"> </A>
|
|
<H2>SEE ALSO</H2>
|
|
|
|
<P>
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?5+pam.conf">pam.conf</A></B>(5),
|
|
<B><A HREF="/cgi-bin/man/man2html?5+pam.d">pam.d</A></B>(5),
|
|
<B><A HREF="/cgi-bin/man/man2html?7+pam">pam</A></B>(7)
|
|
<A NAME="lbAJ"> </A>
|
|
<H2>AUTHOR</H2>
|
|
|
|
<P>
|
|
|
|
pam_umask was written by Thorsten Kukuk <<A HREF="mailto:kukuk@thkukuk.de">kukuk@thkukuk.de</A>>.
|
|
<P>
|
|
|
|
<HR>
|
|
<A NAME="index"> </A><H2>Index</H2>
|
|
<DL>
|
|
<DT id="14"><A HREF="#lbAB">NAME</A><DD>
|
|
<DT id="15"><A HREF="#lbAC">SYNOPSIS</A><DD>
|
|
<DT id="16"><A HREF="#lbAD">DESCRIPTION</A><DD>
|
|
<DT id="17"><A HREF="#lbAE">OPTIONS</A><DD>
|
|
<DT id="18"><A HREF="#lbAF">MODULE TYPES PROVIDED</A><DD>
|
|
<DT id="19"><A HREF="#lbAG">RETURN VALUES</A><DD>
|
|
<DT id="20"><A HREF="#lbAH">EXAMPLES</A><DD>
|
|
<DT id="21"><A HREF="#lbAI">SEE ALSO</A><DD>
|
|
<DT id="22"><A HREF="#lbAJ">AUTHOR</A><DD>
|
|
</DL>
|
|
<HR>
|
|
This document was created by
|
|
<A HREF="/cgi-bin/man/man2html">man2html</A>,
|
|
using the manual pages.<BR>
|
|
Time: 00:06:15 GMT, March 31, 2021
|
|
</BODY>
|
|
</HTML>
|