1CHOWN(1)                         User Commands                        CHOWN(1)
2
3
4

NAME

6       chown - change file owner and group
7

SYNOPSIS

9       chown [OPTION]... [OWNER][:[GROUP]] FILE...
10       chown [OPTION]... --reference=RFILE FILE...
11

DESCRIPTION

13       This manual page documents the GNU version of chown.  chown changes the
14       user and/or group ownership of each given file.  If only  an  owner  (a
15       user  name or numeric user ID) is given, that user is made the owner of
16       each given file, and the files' group is not changed.  If the owner  is
17       followed  by  a  colon  and a group name (or numeric group ID), with no
18       spaces between them, the group ownership of the  files  is  changed  as
19       well.  If a colon but no group name follows the user name, that user is
20       made the owner of the files and the group of the files  is  changed  to
21       that  user's  login  group.   If the colon and group are given, but the
22       owner is omitted, only the group of the files is changed; in this case,
23       chown  performs  the same function as chgrp.  If only a colon is given,
24       or if the entire operand is empty, neither the owner nor the  group  is
25       changed.
26

OPTIONS

28       Change the owner and/or group of each FILE to OWNER and/or GROUP.  With
29       --reference, change the owner and group of each FILE to those of RFILE.
30
31       -c, --changes
32              like verbose but report only when a change is made
33
34       -f, --silent, --quiet
35              suppress most error messages
36
37       -v, --verbose
38              output a diagnostic for every file processed
39
40       --dereference
41              affect the referent of each symbolic link (this is the default),
42              rather than the symbolic link itself
43
44       -h, --no-dereference
45              affect  symbolic  links  instead  of any referenced file (useful
46              only on systems that can change the ownership of a symlink)
47
48       --from=CURRENT_OWNER:CURRENT_GROUP
49              change the owner and/or group of each file only if  its  current
50              owner  and/or  group  match those specified here.  Either may be
51              omitted, in which case a match is not required for  the  omitted
52              attribute
53
54       --no-preserve-root
55              do not treat '/' specially (the default)
56
57       --preserve-root
58              fail to operate recursively on '/'
59
60       --reference=RFILE
61              use  RFILE's  owner and group rather than specifying OWNER:GROUP
62              values
63
64       -R, --recursive
65              operate on files and directories recursively
66
67       The following options modify how a hierarchy is traversed when  the  -R
68       option  is also specified.  If more than one is specified, only the fi‐
69       nal one takes effect.
70
71       -H     if a command line argument is a symbolic link  to  a  directory,
72              traverse it
73
74       -L     traverse every symbolic link to a directory encountered
75
76       -P     do not traverse any symbolic links (default)
77
78       --help display this help and exit
79
80       --version
81              output version information and exit
82
83       Owner  is  unchanged  if  missing.   Group is unchanged if missing, but
84       changed to login group if implied by a ':' following a symbolic  OWNER.
85       OWNER and GROUP may be numeric as well as symbolic.
86

EXAMPLES

88       chown root /u
89              Change the owner of /u to "root".
90
91       chown root:staff /u
92              Likewise, but also change its group to "staff".
93
94       chown -hR root /u
95              Change the owner of /u and subfiles to "root".
96

AUTHOR

98       Written by David MacKenzie and Jim Meyering.
99

REPORTING BUGS

101       GNU coreutils online help: <https://www.gnu.org/software/coreutils/>
102       Report any translation bugs to <https://translationproject.org/team/>
103
105       Copyright  ©  2021  Free Software Foundation, Inc.  License GPLv3+: GNU
106       GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
107       This is free software: you are free  to  change  and  redistribute  it.
108       There is NO WARRANTY, to the extent permitted by law.
109

SEE ALSO

111       chown(2)
112
113       Full documentation <https://www.gnu.org/software/coreutils/chown>
114       or available locally via: info '(coreutils) chown invocation'
115
116
117
118GNU coreutils 9.0                 March 2022                          CHOWN(1)
Impressum