Debian Codegraph @

upstream/debian-unstable/man1/chown.1

raw
1 .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.50.1.
2 .TH CHOWN "1" "February 2026" "GNU coreutils 9.10" "User Commands"
3 .SH NAME
4 chown \- change file owner and group
5 .SH SYNOPSIS
6 .B chown
7 [\fI\,OPTION\/\fR]... [\fI\,OWNER\/\fR][\fI\,:\/\fR[\fI\,GROUP\/\fR]] \fI\,FILE\/\fR...
8 .br
9 .B chown
10 [\fI\,OPTION\/\fR]... \fI\,--reference=RFILE FILE\/\fR...
11 .SH DESCRIPTION
12 This manual page
13 documents the GNU version of
14 .BR chown .
15 .B chown
16 changes the user and/or group ownership of each given file. If
17 only an owner (a user name or numeric user ID) is given, that user is made the
18 owner of each given file, and the files' group is not changed. If the
19 owner is followed by a colon and a group name (or numeric group ID),
20 with no spaces between them, the group ownership of the files is
21 changed as well. If a colon but no group name follows the user name,
22 that user is made the owner of the files and the group of the files is
23 changed to that user's login group. If the colon and group are given,
24 but the owner is omitted, only the group of the files is changed;
25 in this case,
26 .B chown
27 performs the same function as
28 .BR chgrp .
29 If only a colon is given, or if the entire operand is empty, neither the
30 owner nor the group is changed.
31 .SH OPTIONS
32 .PP
33 Change the owner and/or group of each FILE to OWNER and/or GROUP.
34 With \fB\-\-reference\fR, change the owner and group of each FILE to those of RFILE.
35 .TP
36 \X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#chown-c'\fB\-c, \-\-changes\fP\X'tty: link'
37 like verbose but report only when a change is made
38 .TP
39 \X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#chown-f'\fB\-f, \-\-silent, \-\-quiet\fP\X'tty: link'
40 suppress most error messages
41 .TP
42 \X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#chown-v'\fB\-v, \-\-verbose\fP\X'tty: link'
43 output a diagnostic for every file processed
44 .TP
45 \X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#chown--dereference'\fB\-\-dereference\fP\X'tty: link'
46 affect the referent of each symbolic link (this is
47 the default), rather than the symbolic link itself
48 .TP
49 \X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#chown-h'\fB\-h, \-\-no\-dereference\fP\X'tty: link'
50 affect symbolic links instead of any referenced file;
51 useful only on systems that can change the ownership of a symlink
52 .TP
53 \X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#chown--from'\fB\-\-from=CURRENT_OWNER:CURRENT_GROUP\fP\X'tty: link'
54 change the ownership of each file only if its
55 current owner and/or group match those specified here.
56 Either may be omitted, in which case a match
57 is not required for the omitted attribute
58 .TP
59 \X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#chown--no-preserve-root'\fB\-\-no\-preserve\-root\fP\X'tty: link'
60 do not treat '/' specially (the default)
61 .TP
62 \X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#chown--preserve-root'\fB\-\-preserve\-root\fP\X'tty: link'
63 fail to operate recursively on '/'
64 .TP
65 \X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#chown--reference'\fB\-\-reference=RFILE\fP\X'tty: link'
66 use RFILE's ownership rather than specifying values.
67 RFILE is always dereferenced if a symbolic link.
68 .TP
69 \X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#chown-R'\fB\-R, \-\-recursive\fP\X'tty: link'
70 operate on files and directories recursively
71 .PP
72 The following options modify how a hierarchy is traversed when the \fB\-R\fR
73 option is also specified. If more than one is specified, only the final
74 one takes effect. \fB\-P\fR is the default.
75 .TP
76 \X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#chown-H'\fB\-H\fP\X'tty: link'
77 if a command line argument is a symlink to a directory, traverse it
78 .TP
79 \X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#chown-L'\fB\-L\fP\X'tty: link'
80 traverse every symbolic link to a directory encountered
81 .TP
82 \X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#chown-P'\fB\-P\fP\X'tty: link'
83 do not traverse any symbolic links
84 .TP
85 \X'tty: link https://www.gnu.org/software/coreutils/chown#chown--help'\fB\-\-help\fP\X'tty: link'
86 display this help and exit
87 .TP
88 \X'tty: link https://www.gnu.org/software/coreutils/chown#chown--version'\fB\-\-version\fP\X'tty: link'
89 output version information and exit
90 .PP
91 Owner is unchanged if missing. Group is unchanged if missing, but changed
92 to login group if implied by a ':' following a symbolic OWNER.
93 OWNER and GROUP may be numeric as well as symbolic.
94 .SH EXAMPLES
95 .TP
96 chown root /u
97 Change the owner of /u to "root".
98 .TP
99 chown root:staff /u
100 Likewise, but also change its group to "staff".
101 .TP
102 chown \-hR root /u
103 Change the owner of /u and subfiles to "root".
104 .SH AUTHOR
105 Written by David MacKenzie and Jim Meyering.
106 .SH "REPORTING BUGS"
107 Report bugs to: bug\[email protected]
108 .br
109 GNU coreutils home page: <https://www.gnu.org/software/coreutils/>
110 .br
111 General help using GNU software: <https://www.gnu.org/gethelp/>
112 .br
113 Report any translation bugs to <https://translationproject.org/team/>
114 .SH "SEE ALSO"
115 \fBchown\fP(2)
116 .PP
117 .br
118 Full documentation <https://www.gnu.org/software/coreutils/chown>
119 .br
120 or available locally via: info \(aq(coreutils) chown invocation\(aq
121 .PP
122 .br
123 Packaged by Debian (9.10\-1)
124 .br
125 Copyright \(co 2026 Free Software Foundation, Inc.
126 .br
127 License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
128 .br
129 This is free software: you are free to change and redistribute it.
130 .br
131 There is NO WARRANTY, to the extent permitted by law.