{
    "mode": "man",
    "parameter": "chown",
    "section": "1",
    "url": "https://www.chedong.com/phpMan.php/man/chown/1/json",
    "generated": "2026-05-30T05:14:55Z",
    "synopsis": "chown [OPTION]... [OWNER][:[GROUP]] FILE...\nchown [OPTION]... --reference=RFILE FILE...",
    "sections": {
        "NAME": {
            "content": "chown - change file owner and group\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "chown [OPTION]... [OWNER][:[GROUP]] FILE...\nchown [OPTION]... --reference=RFILE FILE...\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "This  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",
            "subsections": []
        },
        "OPTIONS": {
            "content": "Change 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",
            "subsections": [
                {
                    "name": "-c --changes",
                    "content": "like verbose but report only when a change is made\n",
                    "flag": "-c",
                    "long": "--changes"
                },
                {
                    "name": "-f --silent --quiet",
                    "content": "suppress most error messages\n",
                    "flag": "-f",
                    "long": "--quiet"
                },
                {
                    "name": "-v --verbose",
                    "content": "output a diagnostic for every file processed\n",
                    "flag": "-v",
                    "long": "--verbose"
                },
                {
                    "name": "--dereference",
                    "content": "affect  the referent of each symbolic link (this is the default), rather than the sym‐\nbolic link itself\n",
                    "long": "--dereference"
                },
                {
                    "name": "-h --no-dereference",
                    "content": "affect 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",
                    "flag": "-h",
                    "long": "--no-dereference"
                },
                {
                    "name": "--no-preserve-root",
                    "content": "do not treat '/' specially (the default)\n",
                    "long": "--no-preserve-root"
                },
                {
                    "name": "--preserve-root",
                    "content": "fail to operate recursively on '/'\n\n--reference=RFILE\nuse RFILE's owner and group rather than specifying OWNER:GROUP values\n",
                    "long": "--preserve-root"
                },
                {
                    "name": "-R --recursive",
                    "content": "operate 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",
                    "flag": "-R",
                    "long": "--recursive"
                },
                {
                    "name": "-H",
                    "content": "",
                    "flag": "-H"
                },
                {
                    "name": "-L",
                    "content": "",
                    "flag": "-L"
                },
                {
                    "name": "-P",
                    "content": "--help display this help and exit\n",
                    "flag": "-P"
                },
                {
                    "name": "--version",
                    "content": "output 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",
                    "long": "--version"
                }
            ]
        },
        "EXAMPLES": {
            "content": "chown 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",
            "subsections": []
        },
        "AUTHOR": {
            "content": "Written by David MacKenzie and Jim Meyering.\n",
            "subsections": []
        },
        "REPORTING BUGS": {
            "content": "GNU coreutils online help: <https://www.gnu.org/software/coreutils/>\nReport any translation bugs to <https://translationproject.org/team/>\n",
            "subsections": []
        },
        "COPYRIGHT": {
            "content": "Copyright © 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",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "chown(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)",
            "subsections": []
        }
    },
    "summary": "chown - change file owner and group",
    "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": []
}