免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2167 | 回复: 4

[系统管理] drwxr-x---+ 是? [复制链接]

论坛徽章:
0
发表于 2014-11-29 21:18 |显示全部楼层
请教一个访问权限的问题。

ghostlinux目录下面有一个iso文件,用kvm虚拟机时启动这个iso文件,virt-manager报告:访问这个iso文件permission denied,

ls -al 发现这个目录的权限

drwxr-x---+ 1 hujun users       218 Nov 29 20:40 ghostlinux

修改 chmod o+rx  ghostlinux 之后,问题解决。

那么问题来了, +是什么, 表示什么含义,是怎么制造出来的?  

论坛徽章:
0
发表于 2014-11-30 11:59 |显示全部楼层
Linux下得ACL

论坛徽章:
0
发表于 2014-12-03 15:34 |显示全部楼层
本帖最后由 wwenyunkui2013 于 2014-12-03 16:14 编辑

[root@test_client test]# id test2
uid=502(test2) gid=502(test2) groups=502(test2),504(test)

protocols文件的原本属性:
[root@test_client test]# ll protocols
-rw-------. 1 root root 6455 Nov 25 10:49 protocols
[root@test_client test]# getfacl protocols
# file: protocols
# owner: root
# group: root
user::rw-
group::---
other::---

test2不能读取该文件:
[root@test_client test]# su - test2
[test2@test_client ~]$ vi /tmp/test/protocols
[test2@test_client ~]$ cat /tmp/test/protocols
cat: /tmp/test/protocols: Permission denied
[test2@test_client ~]$ exit
logout

修改文件的ACL:
[root@test_client test]# setfacl -m u:test2:rw protocols
[root@test_client test]# getfacl protocols
# file: protocols
# owner: root
# group: root
user::rw-
user:test2:rw-
group::---
mask::rw-
other::---

test2能够成功读取:
[root@test_client test]# su - test2
[test2@test_client ~]$ cat /tmp/test/protocols
# /etc/protocols:
# $Id: protocols,v 1.9 2009/09/29 15:11:55 ovasik Exp $
#
.
.
.
.

恢复文件的ACL:
[root@test_client test]# setfacl -b protocols
[root@test_client test]# getfacl protocols   
# file: protocols
# owner: root
# group: root
user::rw-
group::---
other::---

论坛徽章:
33
ChinaUnix元老
日期:2015-02-02 08:55:39CU十四周年纪念徽章
日期:2019-08-20 08:30:3720周年集字徽章-周	
日期:2020-10-28 14:13:3020周年集字徽章-20	
日期:2020-10-28 14:04:3019周年集字徽章-CU
日期:2019-09-08 23:26:2519周年集字徽章-19
日期:2019-08-27 13:31:262016科比退役纪念章
日期:2022-04-24 14:33:24
发表于 2014-12-03 15:53 |显示全部楼层

求职 : Linux运维
论坛徽章:
203
拜羊年徽章
日期:2015-03-03 16:15:432015年辞旧岁徽章
日期:2015-03-03 16:54:152015年迎新春徽章
日期:2015-03-04 09:57:092015小元宵徽章
日期:2015-03-06 15:58:182015年亚洲杯之约旦
日期:2015-04-05 20:08:292015年亚洲杯之澳大利亚
日期:2015-04-09 09:25:552015年亚洲杯之约旦
日期:2015-04-10 17:34:102015年亚洲杯之巴勒斯坦
日期:2015-04-10 17:35:342015年亚洲杯之日本
日期:2015-04-16 16:28:552015年亚洲杯纪念徽章
日期:2015-04-27 23:29:17操作系统版块每日发帖之星
日期:2015-06-06 22:20:00操作系统版块每日发帖之星
日期:2015-06-09 22:20:00
发表于 2014-12-04 10:38 |显示全部楼层
回复 2# netb2c


  有加号就是用了ACL??不太明白
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP