免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1602 | 回复: 3
打印 上一主题 下一主题

setfacl 的问题 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2010-02-06 15:16 |只看该作者 |倒序浏览
请问一下, 为什么D 不能disable user 'test1' from reading /etc/passwd ?  不是也把other 设为---了吗?

Given:
# logins -l test1
test1 1001 other 1
# logins -l root
root 0 root 0 Super-User
# ls -l /etc/passwd
-rw-r--r-- 1 root sys 726 Jan 25 16:56 /etc/passwd
Which two commands disable test1 from reading /etc/passwd? (Choose two.)
A. #setfacl -m g::---,o:---,m:r-- /etc/passwd
B. #setfacl -m u:test1:rwx,g::r--,o:r--,m:r-- /etc/passwd
C. #setfacl -m u:test1:rwx,g::---,o:r--,m:r-- /etc/passwd
D. #setfacl -m u:test1:rwx,g::r--,o:---,m:r-- /etc/passwd
E. #setfacl -m u:test1:rwx,g::r--,o:r--,m:--- /etc/passwd
Answer: AE

论坛徽章:
0
2 [报告]
发表于 2010-02-07 00:47 |只看该作者
仔细看书的话应该可以知道答案

论坛徽章:
0
3 [报告]
发表于 2010-02-07 06:20 |只看该作者
ok.. i got it...

BCD still allow user allow test1 to read because m:r--

Test1 can still read because "u:test1:rwx" is specified.

A is correct because no "u:test1:rwx" specified.
E is correct because m:--- supress all permission (except owner which is root).

论坛徽章:
0
4 [报告]
发表于 2010-02-07 15:42 |只看该作者
恭喜lz
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP