您的位置:首页 > 运维架构

安装OpenKM

2014-02-09 14:37 239 查看
假设要共享一个文件夹newfile及它下面的两个子目录newfile1,newfile2.要求用户aa管理所有目录,bb管理newfile1目录,cc管理newfile2目录,

用户aa拥有所有权限,

而bb只管理目录newfile1,还有就是可读目录newfile1,但不可以写,

用户cc只管理目录newfile2,还有就是可读目录newfile1,但不可以写,

解析:把aa和bb分成一个组gg2,把aa和cc分成组gg1,

[root@ertou /]# setfacl -m u:aa:rwx,g:gg1:rwx,o::- newfile

[root@ertou /]# setfacl -m u:aa:rwx,g:gg2:rwx,o::- newfile

[root@ertou newfile]# setfacl -m u:bb:rwx,g:gg2:rx,o:rx newfile1

[root@ertou newfile]# setfacl -m u:cc:rwx,g:gg1:rx,o::rx newfile2

[root@ertou samba]# smbpasswd -a aa(bb和cc)
New SMB password:
Retype new SMB password:
Added user aa.

[root@ertou /]# usermod -G gg1,gg2 aa
[root@ertou /]# groups aa
aa : aa gg1 gg2

[root@ertou /]# usermod -g gg2 bb
[root@ertou /]# usermod -g gg1 cc

预设型ACL :就是把权限都先分配出来

[root@ertou newfile]#setfacl -m d:u:cc:rwx,d:g:gg1:rwx,d:o:rx newfile/newfile2

[root@ertou newfile]# setfacl -m d:u:bb:rwx,d:g:gg2:rwx,d:o:rx newfile1
本文出自 “为梦起航” 博客,请务必保留此出处http://ertou.blog.51cto.com/789994/177399
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: