当前时区 GMT+8, 现在时间是 2008-10-8 09:17 游客: 注册 登录 仅登录论坛 | 搜索 帮助
标题: 文件属性的问题
lvcoffee
新手上路
Rank: 1


UID 244620
精华 0
积分 13
帖子 26
阅读权限 10
注册 2007-11-13
来自 浙江.杭州
状态 离线
发表于 2008-3-29 16:24  资料  短消息  加为好友  QQ
文件属性的问题

我在/dev下用ll命令,看到如下
crw-rw----+ 1 root root    14,  12 03-29 15:34 adsp
crw-------  1 root root    10, 175 03-29 15:34 agpgart
crw-rw----+ 1 root root    14,   4 03-29 15:34 audio
drwxr-xr-x  2 root root         80 03-29 15:34 bsg
..............
请问crw-rw----+的“+”是代表什么含义呢?

顶部
12543122
金牌会员
Rank: 8Rank: 8


UID 98253
精华 1
积分 7932
帖子 3330
阅读权限 90
注册 2004-2-25
状态 离线
发表于 2008-3-29 17:34  资料  短消息  加为好友  QQ
那是文件系统的访问控制列表(ACL)

权限后面的+,代表这些文件被设置了acl

#setfacl -R -m u:maitr:rwx /root/

这样用户maitr就对/root 文件夹下的所有文件有了rwx权限……

# ls -l /root
total 72
-rw-rwx---+ 1 root root   799 Feb 25 19:41 anaconda-ks.cfg
-rw-rwxr--+ 1 root root 18169 Feb 25 19:41 install.log
-rw-rwxr--+ 1 root root  3956 Feb 25 19:41 install.log.syslog
-rw-rwx---+ 1 root root 18022 Feb 29 04:14 mbox
-rw-rwxr--+ 1 root root  1176 Mar 23 01:33 squid.conf
#

用getfacl来查看设置:

# getfacl /root
getfacl: Removing leading '/' from absolute path names
# file: root
# owner: root
# group: root
user::rwx
user:maitr:rwx
group::r-x
mask::rwx
other::---
#

更多的资料可以查看man手册或者google一下





專業潛水人員,不承擔主動打招呼義務。
顶部
 


Powered by Discuz! 5.5.0  © 2001-2007 Comsenz Inc.
清除 Cookies - 联系我们 - 中国Linux公社 - WAP