1
Autonomous 2015 年 5 月 1 日
对于已启用所有者的宗卷,其宗卷根目录的
所有者为root:wheel 权限应为755 |
2
ItzhacLea 2015 年 5 月 1 日
第三个是最接近的,但即使如此,wheel 的权限也仅为read only
|
3
cuthead OP |
5
Autonomous 2015 年 5 月 1 日 |
6
Autonomous 2015 年 5 月 1 日
@cuthead before you apply those commands, disable 'Ignore ownership on this volume' is required.
|
7
cuthead OP @Autonomous 如何显示分区的permission和ownership?ls -l只显示文件列表的权限。中间图显示组成员是staff是怎么回事?为什么可以同时用system和user的个人权限?如何改权限的人的名字用Terminal
|
8
Autonomous 2015 年 5 月 1 日 @cuthead 首先要保证宗卷被正常挂载,然后cd /volumes
接着ls -al就可以看到相关宗卷的所有者/所有者所在的组/对应权限。 chown命令用于更改所有者:所有者对应的组。 因为一个用户可以隶属于多个组,所以除了指定所有者外还要指定一个组。一般来说宗卷根目录是由root账户和wheel组所有。因此sudo chown -R root:wheel chmod命令用于修改权限,7表示rwx(即读写+执行),5表示r-x(直读+执行)。 |
9
Autonomous 2015 年 5 月 1 日
5楼的命令有一个错误! 我不应该加-R的,这里用递归会导致整个宗卷包括其子文件夹/文件都会被改掉权限。其实应该仅应用于宗卷根目录即可。
|
10
cuthead OP @Autonomous 问题解决,多谢解答,原来还得改所有者。
|