{
    "content": [
        {
            "type": "text",
            "text": "# SETCAP(8) (man)\n\n**Summary:** setcap - set file capabilities\n\n**Synopsis:** setcap [-q] [-n <rootuid>] [-v] {capabilities|-|-r} filename [ ... capabilitiesN fileN ]\n\n## See Also\n\n- capfromtext(3)\n- capgetfile(3)\n- capabilities(7)\n- usernamespaces(7)\n- getcap(8)\n\n## Section Outline\n\n- **NAME** (2 lines)\n- **SYNOPSIS** (2 lines)\n- **DESCRIPTION** (18 lines)\n- **EXIT CODE** (3 lines)\n- **REPORTING BUGS** (5 lines)\n- **SEE ALSO** (5 lines)\n\n## Full Content\n\n### NAME\n\nsetcap - set file capabilities\n\n### SYNOPSIS\n\nsetcap [-q] [-n <rootuid>] [-v] {capabilities|-|-r} filename [ ... capabilitiesN fileN ]\n\n### DESCRIPTION\n\nIn the absence of the -v (verify) option setcap sets the capabilities of each specified file‐\nname to the capabilities specified.  The optional -n <rootuid> argument can be  used  to  set\nthe file capability for use only in a user namespace with this root user ID owner. The -v op‐\ntion is used to verify that the specified capabilities  are  currently  associated  with  the\nfile. If -v and -n are supplied, the -n <rootuid> argument is also verified.\n\nThe capabilities are specified in the form described in capfromtext(3).\n\nThe  special  capability string, '-', can be used to indicate that capabilities are read from\nthe standard input. In such cases, the capability set is terminated with a blank line.\n\nThe special capability string, '-r', is used to remove a capability set from  a  file.  Note,\nsetting  an  empty capability set is not the same as removing it. An empty set can be used to\nguarantee a file is not executed with privilege in spite of the fact that the prevailing  am‐\nbient+inheritable sets would otherwise bestow capabilities on executed binaries.\n\nThe -q flag is used to make the program less verbose in its output.\n\n### EXIT CODE\n\nThe  setcap  program will exit with a 0 exit code if successful. On failure, the exit code is\n1.\n\n### REPORTING BUGS\n\nPlease report bugs via:\n\nhttps://bugzilla.kernel.org/buglist.cgi?component=libcap&listid=1047723&product=Tools&reso‐\nlution=---\n\n### SEE ALSO\n\ncapfromtext(3), capgetfile(3), capabilities(7), usernamespaces(7), getcap(8)\n\n\n\n2020-01-07                                    SETCAP(8)\n\n"
        }
    ],
    "structuredContent": {
        "command": "SETCAP",
        "section": "8",
        "mode": "man",
        "summary": "setcap - set file capabilities",
        "synopsis": "setcap [-q] [-n <rootuid>] [-v] {capabilities|-|-r} filename [ ... capabilitiesN fileN ]",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [],
        "see_also": [
            {
                "name": "capfromtext",
                "section": "3",
                "url": "https://www.chedong.com/phpMan.php/man/capfromtext/3/json"
            },
            {
                "name": "capgetfile",
                "section": "3",
                "url": "https://www.chedong.com/phpMan.php/man/capgetfile/3/json"
            },
            {
                "name": "capabilities",
                "section": "7",
                "url": "https://www.chedong.com/phpMan.php/man/capabilities/7/json"
            },
            {
                "name": "usernamespaces",
                "section": "7",
                "url": "https://www.chedong.com/phpMan.php/man/usernamespaces/7/json"
            },
            {
                "name": "getcap",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/getcap/8/json"
            }
        ],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 18,
                "subsections": []
            },
            {
                "name": "EXIT CODE",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "REPORTING BUGS",
                "lines": 5,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 5,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "setcap - set file capabilities\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "setcap [-q] [-n <rootuid>] [-v] {capabilities|-|-r} filename [ ... capabilitiesN fileN ]\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "In the absence of the -v (verify) option setcap sets the capabilities of each specified file‐\nname to the capabilities specified.  The optional -n <rootuid> argument can be  used  to  set\nthe file capability for use only in a user namespace with this root user ID owner. The -v op‐\ntion is used to verify that the specified capabilities  are  currently  associated  with  the\nfile. If -v and -n are supplied, the -n <rootuid> argument is also verified.\n\nThe capabilities are specified in the form described in capfromtext(3).\n\nThe  special  capability string, '-', can be used to indicate that capabilities are read from\nthe standard input. In such cases, the capability set is terminated with a blank line.\n\nThe special capability string, '-r', is used to remove a capability set from  a  file.  Note,\nsetting  an  empty capability set is not the same as removing it. An empty set can be used to\nguarantee a file is not executed with privilege in spite of the fact that the prevailing  am‐\nbient+inheritable sets would otherwise bestow capabilities on executed binaries.\n\nThe -q flag is used to make the program less verbose in its output.\n",
                "subsections": []
            },
            "EXIT CODE": {
                "content": "The  setcap  program will exit with a 0 exit code if successful. On failure, the exit code is\n1.\n",
                "subsections": []
            },
            "REPORTING BUGS": {
                "content": "Please report bugs via:\n\nhttps://bugzilla.kernel.org/buglist.cgi?component=libcap&listid=1047723&product=Tools&reso‐\nlution=---\n",
                "subsections": []
            },
            "SEE ALSO": {
                "content": "capfromtext(3), capgetfile(3), capabilities(7), usernamespaces(7), getcap(8)\n\n\n\n2020-01-07                                    SETCAP(8)",
                "subsections": []
            }
        }
    }
}