{
    "content": [
        {
            "type": "text",
            "text": "# pam_umask (man)\n\n## NAME\n\npamumask - PAM module to set the file mode creation mask\n\n## SYNOPSIS\n\npamumask.so [debug] [silent] [usergroups] [nousergroups] [umask=mask]\n\n## DESCRIPTION\n\npamumask is a PAM module to set the file mode creation mask of the current environment. The\numask affects the default permissions assigned to newly created files.\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION**\n- **OPTIONS** (4 subsections)\n- **MODULE TYPES PROVIDED**\n- **RETURN VALUES**\n- **EXAMPLES**\n- **SEE ALSO**\n- **AUTHOR**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "pam_umask",
        "section": "",
        "mode": "man",
        "summary": "pamumask - PAM module to set the file mode creation mask",
        "synopsis": "pamumask.so [debug] [silent] [usergroups] [nousergroups] [umask=mask]",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [
            "Add the following line to /etc/pam.d/login to set the user specific umask at login:",
            "session optional pamumask.so umask=0022"
        ],
        "see_also": [
            {
                "name": "pam.conf",
                "section": "5",
                "url": "https://www.chedong.com/phpMan.php/man/pam.conf/5/json"
            },
            {
                "name": "pam.d",
                "section": "5",
                "url": "https://www.chedong.com/phpMan.php/man/pam.d/5/json"
            },
            {
                "name": "pam",
                "section": "7",
                "url": "https://www.chedong.com/phpMan.php/man/pam/7/json"
            }
        ],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 17,
                "subsections": []
            },
            {
                "name": "OPTIONS",
                "lines": 1,
                "subsections": [
                    {
                        "name": "debug",
                        "lines": 2
                    },
                    {
                        "name": "silent",
                        "lines": 2
                    },
                    {
                        "name": "usergroups",
                        "lines": 7
                    },
                    {
                        "name": "nousergroups",
                        "lines": 8
                    }
                ]
            },
            {
                "name": "MODULE TYPES PROVIDED",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "RETURN VALUES",
                "lines": 18,
                "subsections": []
            },
            {
                "name": "EXAMPLES",
                "lines": 6,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "AUTHOR",
                "lines": 5,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "pamumask - PAM module to set the file mode creation mask\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "pamumask.so [debug] [silent] [usergroups] [nousergroups] [umask=mask]\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "pamumask is a PAM module to set the file mode creation mask of the current environment. The\numask affects the default permissions assigned to newly created files.\n\nThe PAM module tries to get the umask value from the following places in the following order:\n\n•   umask= entry in the user's GECOS field\n\n•   umask= argument\n\n•   UMASK entry from /etc/login.defs (influenced by USERGROUPSENAB in /etc/login.defs)\n\n•   UMASK= entry from /etc/default/login\n\nThe GECOS field is split on comma ',' characters. The module also in addition to the umask=\nentry recognizes pri= entry, which sets the nice priority value for the session, and ulimit=\nentry, which sets the maximum size of files the processes in the session can create.\n",
                "subsections": []
            },
            "OPTIONS": {
                "content": "",
                "subsections": [
                    {
                        "name": "debug",
                        "content": "Print debug information.\n"
                    },
                    {
                        "name": "silent",
                        "content": "Don't print informative messages.\n"
                    },
                    {
                        "name": "usergroups",
                        "content": "If the user is not root and the username is the same as primary group name, the umask\ngroup bits are set to be the same as owner bits (examples: 022 -> 002, 077 -> 007). Note\nthat using this option explicitly is discouraged. pamumask enables this functionality by\ndefault if /etc/login.defs enables USERGROUPSENAB, and the umask is not set explicitly\nin other places than /etc/login.defs (this is compatible with login's behaviour without\nPAM).\n"
                    },
                    {
                        "name": "nousergroups",
                        "content": "This is the direct opposite of the usergroups option described above, which can be useful\nin case pamumask has been compiled with usergroups enabled by default and you want to\ndisable it at runtime.\n\numask=mask\nSets the calling process's file mode creation mask (umask) to mask & 0777. The value is\ninterpreted as Octal.\n"
                    }
                ]
            },
            "MODULE TYPES PROVIDED": {
                "content": "Only the session type is provided.\n",
                "subsections": []
            },
            "RETURN VALUES": {
                "content": "PAMSUCCESS\nThe new umask was set successfully.\n\nPAMBUFERR\nMemory buffer error.\n\nPAMCONVERR\nThe conversation method supplied by the application failed to obtain the username.\n\nPAMINCOMPLETE\nThe conversation method supplied by the application returned PAMCONVAGAIN.\n\nPAMSERVICEERR\nNo username was given.\n\nPAMUSERUNKNOWN\nUser not known.\n",
                "subsections": []
            },
            "EXAMPLES": {
                "content": "Add the following line to /etc/pam.d/login to set the user specific umask at login:\n\nsession optional pamumask.so umask=0022\n\n\n",
                "subsections": []
            },
            "SEE ALSO": {
                "content": "pam.conf(5), pam.d(5), pam(7)\n",
                "subsections": []
            },
            "AUTHOR": {
                "content": "pamumask was written by Thorsten Kukuk <kukuk@thkukuk.de>.\n\n\n\nLinux-PAM Manual                             06/08/2020                                 PAMUMASK(8)",
                "subsections": []
            }
        }
    }
}