{
    "content": [
        {
            "type": "text",
            "text": "# chown(1) (man)\n\n**Summary:** chown - change file owner and group\n\n**Synopsis:** chown [OPTION]... [OWNER][:[GROUP]] FILE...\nchown [OPTION]... --reference=RFILE FILE...\n\n## Flags\n\n| Flag | Long | Arg | Description |\n|------|------|-----|-------------|\n| -c | --changes | — | like verbose but report only when a change is made |\n| -f | --quiet | — | suppress most error messages |\n| -v | --verbose | — | output a diagnostic for every file processed |\n| — | --dereference | — | affect the referent of each symbolic link (this is the default), rather than the sym‐ bolic link itself |\n| -h | --no-dereference | — | affect symbolic links instead of any referenced file (useful only on systems that can change the ownership of a symlink) |\n| — | --no-preserve-root | — | do not treat '/' specially (the default) |\n| — | --preserve-root | — | fail to operate recursively on '/' --reference=RFILE use RFILE's owner and group rather than specifying OWNER:GROUP valu |\n| -R | --recursive | — | operate on files and directories recursively The following options modify how a hierarchy is traversed when the -R optio |\n| -H | — | — |  |\n| -L | — | — |  |\n| -P | — | — | --help display this help and exit |\n| — | --version | — | output version information and exit Owner is unchanged if missing. Group is unchanged if missing, but changed to login g |\n\n## Examples\n\n- `chown root /u`\n- `Change the owner of /u to \"root\".`\n- `chown root:staff /u`\n- `Likewise, but also change its group to \"staff\".`\n- `chown -hR root /u`\n- `Change the owner of /u and subfiles to \"root\".`\n\n## Section Outline\n\n- **NAME** (2 lines)\n- **SYNOPSIS** (3 lines)\n- **DESCRIPTION** (11 lines)\n- **OPTIONS** (3 lines) — 12 subsections\n  - -c --changes (2 lines)\n  - -f --silent --quiet (2 lines)\n  - -v --verbose (2 lines)\n  - --dereference (3 lines)\n  - -h --no-dereference (8 lines)\n  - --no-preserve-root (2 lines)\n  - --preserve-root (5 lines)\n  - -R --recursive (5 lines)\n  - -H (1 lines)\n  - -L (1 lines)\n  - -P (2 lines)\n  - --version (6 lines)\n- **EXAMPLES** (9 lines)\n- **AUTHOR** (2 lines)\n- **REPORTING BUGS** (3 lines)\n- **COPYRIGHT** (5 lines)\n- **SEE ALSO** (8 lines)\n\n## Full Content\n\n### NAME\n\nchown - change file owner and group\n\n### SYNOPSIS\n\nchown [OPTION]... [OWNER][:[GROUP]] FILE...\nchown [OPTION]... --reference=RFILE FILE...\n\n### DESCRIPTION\n\nThis  manual  page  documents  the GNU version of chown.  chown changes the user and/or group\nownership of each given file.  If only an owner (a user name or numeric user  ID)  is  given,\nthat  user is made the owner of each given file, and the files' group is not changed.  If the\nowner is followed by a colon and a group name (or numeric group ID), with no  spaces  between\nthem, the group ownership of the files is changed as well.  If a colon but no group name fol‐\nlows the user name, that user is made the owner of the files and the group of  the  files  is\nchanged to that user's login group.  If the colon and group are given, but the owner is omit‐\nted, only the group of the files is changed; in this case, chown performs the  same  function\nas chgrp.  If only a colon is given, or if the entire operand is empty, neither the owner nor\nthe group is changed.\n\n### OPTIONS\n\nChange the owner and/or group of each FILE to OWNER and/or GROUP.  With  --reference,  change\nthe owner and group of each FILE to those of RFILE.\n\n#### -c --changes\n\nlike verbose but report only when a change is made\n\n#### -f --silent --quiet\n\nsuppress most error messages\n\n#### -v --verbose\n\noutput a diagnostic for every file processed\n\n#### --dereference\n\naffect  the referent of each symbolic link (this is the default), rather than the sym‐\nbolic link itself\n\n#### -h --no-dereference\n\naffect symbolic links instead of any referenced file (useful only on systems that  can\nchange the ownership of a symlink)\n\n--from=CURRENTOWNER:CURRENTGROUP\nchange  the  owner  and/or  group  of each file only if its current owner and/or group\nmatch those specified here.  Either may be omitted, in which case a match is  not  re‐\nquired for the omitted attribute\n\n#### --no-preserve-root\n\ndo not treat '/' specially (the default)\n\n#### --preserve-root\n\nfail to operate recursively on '/'\n\n--reference=RFILE\nuse RFILE's owner and group rather than specifying OWNER:GROUP values\n\n#### -R --recursive\n\noperate on files and directories recursively\n\nThe  following  options modify how a hierarchy is traversed when the -R option is also speci‐\nfied.  If more than one is specified, only the final one takes effect.\n\n#### -H\n\n#### -L\n\n#### -P\n\n--help display this help and exit\n\n#### --version\n\noutput version information and exit\n\nOwner is unchanged if missing.  Group is unchanged if missing, but changed to login group  if\nimplied  by a ':' following a symbolic OWNER.  OWNER and GROUP may be numeric as well as sym‐\nbolic.\n\n### EXAMPLES\n\nchown root /u\nChange the owner of /u to \"root\".\n\nchown root:staff /u\nLikewise, but also change its group to \"staff\".\n\nchown -hR root /u\nChange the owner of /u and subfiles to \"root\".\n\n### AUTHOR\n\nWritten by David MacKenzie and Jim Meyering.\n\n### REPORTING BUGS\n\nGNU coreutils online help: <https://www.gnu.org/software/coreutils/>\nReport any translation bugs to <https://translationproject.org/team/>\n\n### COPYRIGHT\n\nCopyright © 2020 Free Software Foundation, Inc.  License GPLv3+: GNU GPL version 3  or  later\n<https://gnu.org/licenses/gpl.html>.\nThis  is free software: you are free to change and redistribute it.  There is NO WARRANTY, to\nthe extent permitted by law.\n\n### SEE ALSO\n\nchown(2)\n\nFull documentation <https://www.gnu.org/software/coreutils/chown>\nor available locally via: info '(coreutils) chown invocation'\n\n\n\nGNU coreutils 8.32                          January 2026                                    CHOWN(1)\n\n"
        }
    ],
    "structuredContent": {
        "command": "chown",
        "section": "1",
        "mode": "man",
        "summary": "chown - change file owner and group",
        "synopsis": "chown [OPTION]... [OWNER][:[GROUP]] FILE...\nchown [OPTION]... --reference=RFILE FILE...",
        "flags": [
            {
                "flag": "-c",
                "long": "--changes",
                "arg": null,
                "description": "like verbose but report only when a change is made"
            },
            {
                "flag": "-f",
                "long": "--quiet",
                "arg": null,
                "description": "suppress most error messages"
            },
            {
                "flag": "-v",
                "long": "--verbose",
                "arg": null,
                "description": "output a diagnostic for every file processed"
            },
            {
                "flag": "",
                "long": "--dereference",
                "arg": null,
                "description": "affect the referent of each symbolic link (this is the default), rather than the sym‐ bolic link itself"
            },
            {
                "flag": "-h",
                "long": "--no-dereference",
                "arg": null,
                "description": "affect symbolic links instead of any referenced file (useful only on systems that can change the ownership of a symlink) --from=CURRENTOWNER:CURRENTGROUP change the owner and/or group of each file only if its current owner and/or group match those specified here. Either may be omitted, in which case a match is not re‐ quired for the omitted attribute"
            },
            {
                "flag": "",
                "long": "--no-preserve-root",
                "arg": null,
                "description": "do not treat '/' specially (the default)"
            },
            {
                "flag": "",
                "long": "--preserve-root",
                "arg": null,
                "description": "fail to operate recursively on '/' --reference=RFILE use RFILE's owner and group rather than specifying OWNER:GROUP values"
            },
            {
                "flag": "-R",
                "long": "--recursive",
                "arg": null,
                "description": "operate on files and directories recursively The following options modify how a hierarchy is traversed when the -R option is also speci‐ fied. If more than one is specified, only the final one takes effect."
            },
            {
                "flag": "-H",
                "long": null,
                "arg": null,
                "description": ""
            },
            {
                "flag": "-L",
                "long": null,
                "arg": null,
                "description": ""
            },
            {
                "flag": "-P",
                "long": null,
                "arg": null,
                "description": "--help display this help and exit"
            },
            {
                "flag": "",
                "long": "--version",
                "arg": null,
                "description": "output version information and exit Owner is unchanged if missing. Group is unchanged if missing, but changed to login group if implied by a ':' following a symbolic OWNER. OWNER and GROUP may be numeric as well as sym‐ bolic."
            }
        ],
        "examples": [
            "chown root /u",
            "Change the owner of /u to \"root\".",
            "chown root:staff /u",
            "Likewise, but also change its group to \"staff\".",
            "chown -hR root /u",
            "Change the owner of /u and subfiles to \"root\"."
        ],
        "see_also": [],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 11,
                "subsections": []
            },
            {
                "name": "OPTIONS",
                "lines": 3,
                "subsections": [
                    {
                        "name": "-c --changes",
                        "lines": 2,
                        "flag": "-c",
                        "long": "--changes"
                    },
                    {
                        "name": "-f --silent --quiet",
                        "lines": 2,
                        "flag": "-f",
                        "long": "--quiet"
                    },
                    {
                        "name": "-v --verbose",
                        "lines": 2,
                        "flag": "-v",
                        "long": "--verbose"
                    },
                    {
                        "name": "--dereference",
                        "lines": 3,
                        "long": "--dereference"
                    },
                    {
                        "name": "-h --no-dereference",
                        "lines": 8,
                        "flag": "-h",
                        "long": "--no-dereference"
                    },
                    {
                        "name": "--no-preserve-root",
                        "lines": 2,
                        "long": "--no-preserve-root"
                    },
                    {
                        "name": "--preserve-root",
                        "lines": 5,
                        "long": "--preserve-root"
                    },
                    {
                        "name": "-R --recursive",
                        "lines": 5,
                        "flag": "-R",
                        "long": "--recursive"
                    },
                    {
                        "name": "-H",
                        "lines": 1,
                        "flag": "-H"
                    },
                    {
                        "name": "-L",
                        "lines": 1,
                        "flag": "-L"
                    },
                    {
                        "name": "-P",
                        "lines": 2,
                        "flag": "-P"
                    },
                    {
                        "name": "--version",
                        "lines": 6,
                        "long": "--version"
                    }
                ]
            },
            {
                "name": "EXAMPLES",
                "lines": 9,
                "subsections": []
            },
            {
                "name": "AUTHOR",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "REPORTING BUGS",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "COPYRIGHT",
                "lines": 5,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 8,
                "subsections": []
            }
        ]
    }
}