Chinaunix

标题: drwxr-x---+ 是? [打印本页]

作者: todaygood    时间: 2014-11-29 21:18
标题: drwxr-x---+ 是?
请教一个访问权限的问题。

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 之后,问题解决。

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


作者: netb2c    时间: 2014-11-30 11:59
Linux下得ACL
作者: wwenyunkui2013    时间: 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::---

作者: Shell_HAT    时间: 2014-12-03 15:53
http://bbs.chinaunix.net/viewthread.php?tid=4066219#pid23775657
作者: lyhabc    时间: 2014-12-04 10:38
回复 2# netb2c


  有加号就是用了ACL??不太明白




欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2