QQ登录

只需一步,快速开始

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 1848|回复: 1

文件属性的问题

[复制链接]
发表于 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-x  2 root root         80 03-29 15:34 bsg
..............
请问crw-rw----+的“+”是代表什么含义呢?
发表于 2008-3-29 17:34:28 | 显示全部楼层
那是文件系统的访问控制列表(ACL)

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

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

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


  1. # ls -l /root
  2. total 72
  3. -rw-rwx---+ 1 root root   799 Feb 25 19:41 anaconda-ks.cfg
  4. -rw-rwxr--+ 1 root root 18169 Feb 25 19:41 install.log
  5. -rw-rwxr--+ 1 root root  3956 Feb 25 19:41 install.log.syslog
  6. -rw-rwx---+ 1 root root 18022 Feb 29 04:14 mbox
  7. -rw-rwxr--+ 1 root root  1176 Mar 23 01:33 squid.conf
  8. #
复制代码

用getfacl来查看设置:



  1. # getfacl /root
  2. getfacl: Removing leading '/' from absolute path names
  3. # file: root
  4. # owner: root
  5. # group: root
  6. user::rwx
  7. user:maitr:rwx
  8. group::r-x
  9. mask::rwx
  10. other::---
  11. #
复制代码

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

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

GMT+8, 2024-4-19 13:43 , Processed in 0.075265 second(s), 15 queries .

© 2021 Powered by Discuz! X3.5.

快速回复 返回顶部 返回列表