CHOWN(1) Cac cau l>nh CHOWN(1)
TEN
chown - change file owner and group
TOM T>T
chown [TUY_CH>N]> [NGU>I_S>_H>U][:[NHOM]] T>P_TIN>
chown [TUY_CH>N]> --reference=T>P_TIN_TC T>P_TIN>
MO T>
This manual page documents the GNU version of chown. chown changes the
user and/or group ownership of each given file. If only an owner (a
user name or numeric user ID) is given, that user is made the owner of
each given file, and the files' group is not changed. If the owner is
followed by a colon and a group name (or numeric group ID), with no
spaces between them, the group ownership of the files is changed as
well. If a colon but no group name follows the user name, that user is
made the owner of the files and the group of the files is changed to
that user's login group. If the colon and group are given, but the
owner is omitted, only the group of the files is changed; in this case,
chown performs the same function as chgrp. If only a colon is given,
or if the entire operand is empty, neither the owner nor the group is
changed.
TUY CH>N
Thay d>i ch> s> h>u va/ho>c nhom c>a t>ng T>P_TIN thanh
NGU>I_S>_H>U va/ho>c NHOM. V>i tuy ch>n --reference, thay
d>i ch> va nhom c>a t>ng T>P_TIN gi>ng v>i T>P_TIN_TC.
-c, --changes
gi>ng v>i --verbose nhung ch> bao cao khi co thay d>i
n>y sinh
-f, --silent, --quiet
ch>n ph>n l>n cac thong tin bao l>i
-v, --verbose
xu>t ra cac chu>n doan cho m>i qua trinh x> ly t>p tin
--dereference
tac d>ng d>n noi ch> d>n c>a m>i lien k>t m>m
(day la m>c d>nh), hon la t> b>n than lien k>t m>m
do
-h, --no-dereference
tac d>ng d>n lien k>t m>m thay vi tham chi>u d>n
t>p tin (ch> h>u d>ng tren h> th>ng co th> thay
d>i quy>n s> h>u c>a m>t lien k>t m>m)
--from=S>_H>U_HI>N_CO:NHOM_HI>N_T>I
change the ownership 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 required for the omitted attribute
--no-preserve-root
khong coi "/" la d>c bi>t (m>c d>nh)
--preserve-root
khong th>c hi>n d> quy tren "/"
--reference=T>P_TIN_TC
use RFILE's ownership rather than specifying values. RFILE is
always dereferenced if a symbolic link.
-R, --recursive
thao tac tren cac t>p tin va thu m>c m>t cach d> qui
The following options modify how a hierarchy is traversed when the -R
option is also specified. If more than one is specified, only the
final one takes effect. -P is the default.
-H n>u d>i s> dong l>nh la lien k>t m>m t>i m>t thu
m>c, thi di qua no
-L di qua m>i lien k>t m>m t>i m>t thu m>c ma no g>p
-P do not traverse any symbolic links
--help hi>n th> tr> giup nay r>i thoat
--version
dua ra thong tin phien b>n r>i thoat
Ch> s> h>u khong thay n>u b> thi>u. Nhom khong thay d>i
n>u thi>u, nhung b> thay d>i thanh nhom dang nh>p n>u d>t
m>t d>u hai ch>m ":" sau CH>_S>_H>U tu>ng trung.
CH>_S>_H>U va NHOM co th> la cac gia tr> s> cung nhu
tu>ng trung.
VI D>
chown root /u
Thay d>i ngu>i s> h>u /u thanh "root".
chown root:staff /u
Cung v>y, nhung thay d>i nhom c>a no thanh "staff".
chown -hR root /u
Thay d>i ngu>i s> h>u /u va cac t>p tin du>i thanh
"root".
TAC GI>
Vi>t b>i David MacKenzie va Jim Meyering.
THONG BAO L>I
Tr> giup tr>c tuy>n GNU coreutils:
Report any translation bugs to
B>N QUY>N
Copyright (C) 2025 Free Software Foundation, Inc. Gi>y phep GPL pb3+
: Gi>y phep Cong c>ng GNU phien b>n 3 hay sau
.
Day la ph>n m>m t> do: b>n co quy>n s>a d>i va phat hanh
l>i no. KHONG CO B>O HANH GI C>, v>i di>u khi>n du>c phap
lu>t cho phep.
XEM THEM
chown(2)
Tai li>u d>y d> co t>i:
ho>c s>n co n>i b> thong qua: info '(coreutils) chown
invocation'
D>CH
B>n d>ch ti>ng Vi>t c>a trang hu>ng d>n nay do
th>c hi>n.
B>n d>ch nay la Tai li>u Mi>n phi; d>c Gi>y phep Cong
c>ng GNU Phien b>n 3
ho>c m>i hon d> bi>t cac di>u kho>n b>n quy>n. Chung
toi cho r>ng KHONG CO TRACH NHI>M PHAP LY.
N>u b>n tim th>y m>t s> sai sot trong b>n d>ch c>a
trang hu>ng d>n nay, vui long g>i thu d>n TODO <>.
GNU coreutils 9.6 Thang 2 nam 2025 CHOWN(1)