[root@localhost bird_bro]# touch chgrp_test.t
[root@localhost bird_bro]# ls -l
total 0
-rw-r--r--. 1 root root 0 Mar 22 15:11 chgrp_test.t
[root@localhost bird_bro]# exit
exit
[kingarthur@localhost ~]$ touch chgrp_usergroup_test.t
[kingarthur@localhost ~]$ ls -l
total 240
-rw-rw-r--. 1 kingarthur kingarthur 0 Mar 22 15:12 chgrp_usergroup_test.t
drwxr-xr-x. 2 kingarthur kingarthur 6 Mar 18 14:28 Desktop
drwxr-xr-x. 3 kingarthur kingarthur 19 Mar 22 15:10 Documents
drwxr-xr-x. 2 kingarthur kingarthur 6 Mar 18 14:28 Downloads
drwxr-xr-x. 2 kingarthur kingarthur 6 Mar 18 14:28 Music
drwxr-xr-x. 2 kingarthur kingarthur 6 Mar 18 14:28 Pictures
drwxr-xr-x. 2 kingarthur kingarthur 6 Mar 18 14:28 Public
-rw-rw-r--. 1 kingarthur kingarthur 57761 Jul 10 2019 README
-rw-rw-r--. 1 kingarthur kingarthur 57761 Jul 10 2019 README.1
-rw-rw-r--. 1 kingarthur kingarthur 57761 Jul 10 2019 README.2
-rw-rw-r--. 1 kingarthur kingarthur 57761 Jul 10 2019 README.3
drwxr-xr-x. 2 kingarthur kingarthur 6 Mar 18 14:28 Templates
drwxrwxr-x. 2 kingarthur kingarthur 6 Mar 19 07:31 test_tty1
drwxr-xr-x. 2 kingarthur kingarthur 6 Mar 18 14:28 Videos
#用户kingarthur 不能将kingarthur用户的文件移动到用户root创建的目录下
[kingarthur@localhost ~]$ mv ./chgrp_usergroup_test.t ./Documents/Linux/bird_bro/
mv: cannot move ‘./chgrp_usergroup_test.t’ to ‘./Documents/Linux/bird_bro/chgrp_usergroup_test.t’: Permission denied
[kingarthur@localhost ~]$ su
Password:
[root@localhost kingarthur]# ls
chgrp_usergroup_test.t Desktop Documents Downloads Music Pictures Public README README.1 README.2 README.3 Templates test_tty1 Videos
[root@localhost kingarthur]# mv ./chgrp_usergroup_test.t ./Documents/Linux/bird_bro/
Linux_centos7_文件权限与目录配置 _(Bird_Bro)
最新推荐文章于 2022-11-05 14:24:36 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)