{
    "mode": "info",
    "parameter": "runcon",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/info/runcon/json",
    "generated": "2026-11-15T14:58:33Z",
    "sections": {
        "File: coreutils.info,  Node: runcon invocation,  Prev: chcon invocation,  Up: SELinux context": {
            "content": "",
            "subsections": [
                {
                    "name": "22.2 'runcon': Run a command in specified SELinux context",
                    "content": "'runcon' runs file in specified SELinux security context.\n\nSynopses:\nruncon CONTEXT COMMAND [ARGS]\nruncon [ -c ] [-u USER] [-r ROLE] [-t TYPE] [-l RANGE] COMMAND [ARGS]\n\nRun COMMAND with completely-specified CONTEXT, or with current or\ntransitioned security context modified by one or more of LEVEL, ROLE,\nTYPE and USER.\n\nIf none of '-c', '-t', '-u', '-r', or '-l' is specified, the first\nargument is used as the complete context.  Any additional arguments\nafter COMMAND are interpreted as arguments to the command.\n\nWith neither CONTEXT nor COMMAND, print the current security context.\n\nNote also the 'setpriv' command which can be used to set the\nNONEWPRIVS bit using 'setpriv --no-new-privs runcon ...', thus\ndisallowing usage of a security context with more privileges than the\nprocess would normally have.\n\n'runcon' accepts the following options.  Also see *note Common\noptions::.\n\n'-c'\n'--compute'\nCompute process transition context before modifying.\n\n'-u USER'\n'--user=USER'\nSet user USER in the target security context.\n\n'-r ROLE'\n'--role=ROLE'\nSet role ROLE in the target security context.\n\n'-t TYPE'\n'--type=TYPE'\nSet type TYPE in the target security context.\n\n'-l RANGE'\n'--range=RANGE'\nSet range RANGE in the target security context.\n\nExit status:\n\n125 if 'runcon' itself fails\n126 if COMMAND is found but cannot be invoked\n127 if COMMAND cannot be found\nthe exit status of COMMAND otherwise\n"
                }
            ]
        }
    },
    "flags": [],
    "examples": [],
    "see_also": []
}