lvcoffee 发表于 2008-3-29 16:24:32

文件属性的问题

我在/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-x2 root root         80 03-29 15:34 bsg
..............
请问crw-rw----+的“+”是代表什么含义呢?

12543122 发表于 2008-3-29 17:34:28

那是文件系统的访问控制列表(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 root3956 Feb 25 19:41 install.log.syslog
-rw-rwx---+ 1 root root 18022 Feb 29 04:14 mbox
-rw-rwxr--+ 1 root root1176 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一下
页: [1]
查看完整版本: 文件属性的问题