{
    "content": [
        {
            "type": "text",
            "text": "# dpkg-statoverride(1) (man)\n\n**Summary:** dpkg-statoverride - override ownership and mode of files\n\n**Synopsis:** dpkg-statoverride [option...] command\n\n## Flags\n\n| Flag | Long | Arg | Description |\n|------|------|-----|-------------|\n| — | --force | — | Force an action, even if a sanity check would otherwise prohibit it. This is necessary to override an existing override. |\n| — | --update | — | Immediately try to change the path to the new owner and mode if it exists. |\n| — | --quiet | — | Be less verbose about what we do. |\n\n## See Also\n\n- dpkg(1)\n\n## Section Outline\n\n- **NAME** (2 lines)\n- **SYNOPSIS** (2 lines)\n- **DESCRIPTION** (8 lines)\n- **COMMANDS** (16 lines) — 3 subsections\n  - --help (2 lines)\n  - --force-help (2 lines)\n  - --version (2 lines)\n- **OPTIONS** (31 lines) — 3 subsections\n  - --force (4 lines)\n  - --update (2 lines)\n  - --quiet (2 lines)\n- **EXIT STATUS** (7 lines)\n- **ENVIRONMENT** (16 lines)\n- **FILES** (8 lines)\n- **SEE ALSO** (5 lines)\n\n## Full Content\n\n### NAME\n\ndpkg-statoverride - override ownership and mode of files\n\n### SYNOPSIS\n\ndpkg-statoverride [option...] command\n\n### DESCRIPTION\n\n“stat overrides” are a way to tell dpkg(1) to use a different owner or mode for a path when a\npackage is installed (this applies to any filesystem object that dpkg handles, including\ndirectories, devices, etc.). This can be used to force programs that are normally setuid to\nbe install without a setuid flag, or only executable by a certain group.\n\ndpkg-statoverride is a utility to manage the list of stat overrides. It has three basic\nfunctions: adding, removing and listing overrides.\n\n### COMMANDS\n\n--add user group mode path\nAdd an override for path. path does not need to exist when this command is used; the\noverride will be stored and used later.  Users and groups can be specified by their name\n(for example root or nobody), or by their number by prepending the number with a ‘#’ (for\nexample #0 or #65534).  The mode needs to be specified in octal.\n\nIf --update is specified and path exists, it is immediately set to the new owner and\nmode.\n\n--remove path\nRemove an override for path, the status of path is left unchanged by this command.\n\n--list [glob-pattern]\nList all overrides. If a glob pattern is specified restrict the output to overrides which\nmatch the glob.\n\n#### --help\n\nShow the usage message and exit.\n\n#### --force-help\n\nGive help about the --force-thing options (since dpkg 1.19.5).\n\n#### --version\n\nShow the version and exit.\n\n### OPTIONS\n\n--admindir directory\nSet the administrative directory to directory.  This is where the statoverride file is\nstored.  Defaults to «/var/lib/dpkg».\n\n--instdir directory\nSet the installation directory, which refers to the directory where packages get\ninstalled (since dpkg 1.19.2).  Defaults to «/».\n\n--root directory\nSet the root directory to directory, which sets the installation directory to «directory»\nand the administrative directory to «directory/var/lib/dpkg» (since dpkg 1.19.2).\n\n--force-things\n--no-force-things, --refuse-things\nForce or refuse (no-force and refuse mean the same thing) to do some things (since dpkg\n1.19.5).  things is a comma separated list of things specified below.  --force-help\ndisplays a message describing them.  Things marked with (*) are forced by default.\n\nWarning: These options are mostly intended to be used by experts only.  Using them\nwithout fully understanding their effects may break your whole system.\n\nall: Turns on (or off) all force options.\n\nstatoverride-add: Overwrite an existing stat override when adding it (since dpkg 1.19.5).\n\nstatoverride-remove: Ignore a missing stat override when removing it (since dpkg 1.19.5).\n\nsecurity-mac(*): Use platform-specific Mandatory Access Controls (MAC) based security\nwhen installing files into the filesystem (since dpkg 1.19.5).  On Linux systems the\nimplementation uses SELinux.\n\n#### --force\n\nForce an action, even if a sanity check would otherwise prohibit it.  This is necessary\nto override an existing override.  This option is deprecated (since dpkg 1.19.5), it is\nreplaced by --force-all.\n\n#### --update\n\nImmediately try to change the path to the new owner and mode if it exists.\n\n#### --quiet\n\nBe less verbose about what we do.\n\n### EXIT STATUS\n\n0   The requested action was successfully performed.\n\n1   For --list, if there are no overrides or none match the supplied glob.\n\n2   Fatal or unrecoverable error due to invalid command-line usage, or interactions with the\nsystem, such as accesses to the database, memory allocations, etc.\n\n### ENVIRONMENT\n\nDPKGROOT\nIf set and the --instdir or --root options have not been specified, it will be used as\nthe filesystem root directory (since dpkg 1.19.2).\n\nDPKGADMINDIR\nIf set and the --admindir or --root options have not been specified, it will be used as\nthe dpkg data directory.\n\nDPKGFORCE\nIf set and none of the --force-... options have been specified, it will be used as the\nforce options to use (since dpkg 1.19.5).\n\nDPKGCOLORS\nSets the color mode (since dpkg 1.18.5).  The currently accepted values are: auto\n(default), always and never.\n\n### FILES\n\n/var/lib/dpkg/statoverride\nFile which contains the current list of stat overrides of the system. It is located in\nthe dpkg administration directory, along with other files important to dpkg, such as\nstatus or available.\n\nNote: dpkg-statoverride preserves the old copy of this file, with extension “-old”,\nbefore replacing it with the new one.\n\n### SEE ALSO\n\ndpkg(1).\n\n\n\n1.21.1                                       2025-09-09                         dpkg-statoverride(1)\n\n"
        }
    ],
    "structuredContent": {
        "command": "dpkg-statoverride",
        "section": "1",
        "mode": "man",
        "summary": "dpkg-statoverride - override ownership and mode of files",
        "synopsis": "dpkg-statoverride [option...] command",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [
            {
                "flag": "",
                "long": "--force",
                "arg": null,
                "description": "Force an action, even if a sanity check would otherwise prohibit it. This is necessary to override an existing override. This option is deprecated (since dpkg 1.19.5), it is replaced by --force-all."
            },
            {
                "flag": "",
                "long": "--update",
                "arg": null,
                "description": "Immediately try to change the path to the new owner and mode if it exists."
            },
            {
                "flag": "",
                "long": "--quiet",
                "arg": null,
                "description": "Be less verbose about what we do."
            }
        ],
        "examples": [],
        "see_also": [
            {
                "name": "dpkg",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/dpkg/1/json"
            }
        ],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 8,
                "subsections": []
            },
            {
                "name": "COMMANDS",
                "lines": 16,
                "subsections": [
                    {
                        "name": "--help",
                        "lines": 2,
                        "long": "--help"
                    },
                    {
                        "name": "--force-help",
                        "lines": 2,
                        "long": "--force-help"
                    },
                    {
                        "name": "--version",
                        "lines": 2,
                        "long": "--version"
                    }
                ]
            },
            {
                "name": "OPTIONS",
                "lines": 31,
                "subsections": [
                    {
                        "name": "--force",
                        "lines": 4,
                        "long": "--force"
                    },
                    {
                        "name": "--update",
                        "lines": 2,
                        "long": "--update"
                    },
                    {
                        "name": "--quiet",
                        "lines": 2,
                        "long": "--quiet"
                    }
                ]
            },
            {
                "name": "EXIT STATUS",
                "lines": 7,
                "subsections": []
            },
            {
                "name": "ENVIRONMENT",
                "lines": 16,
                "subsections": []
            },
            {
                "name": "FILES",
                "lines": 8,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 5,
                "subsections": []
            }
        ]
    }
}