linux 文件权限带点,Linux文件权限属性后面的点的含义(ls -l)

今天突然注意到$ls -l显示文件时,权限列后面有个点。

如:

-rw-rw-r--. 1 user group 13767 12月 25 2014 index.html

解释:

开启了SELinux功能的Linux系统才会有这个点。

那个点表示文件带有“SELinux的安全上下文”。

CentOS7默认是开启SELinux的,所以会有这个点,

如果关闭SELinux,然后再创建文件,新创建的文件就不会再有这个点了,

但是以前创建的文件本来有这个点的还会显示这个点(虽然SELinux不起作用了)。

参考下边命令应该能得到答案

$info coreutils 'ls invocation'

Following the file mode bits is a single character that specifies

whether an alternate access method such as an access control list

applies to the file. When the character following the file mode

bits is a space, there is no alternate access method. When it is

a printing character, then there is such a method.

在文件权限位后面,附加有一个单字符。用来表示是否有一个

可替换的访问控制措施应用在这个文件上。例如,访问控制列表(ACL,access control list)。

当文件权限位后面附加的是一个空格时,表示系统没有可替换的访问控制措施。

当是一个可打印字符时,表示系统存在这样一个访问控制措施。

GNU ‘ls’ uses a ‘.’ character to indicate a file with an SELinux

security context, but no other alternate access method.

GNU的ls命令使用 ‘.’字符表示文件使用了SELinux安全上下文,

但是没有使用其他的访问控制措施。

A file with any other combination of alternate access methods is

marked with a ‘+’ character.

一个文件结合了其他访问控制措施,文件用‘+’字符标记 。(如:ACL)

一个文件就算没有SELinux上下文,只用应用ACL,也能标记成‘+’字符。

一个文件有SELinux上下文,也有ACL,也标记成‘+’字符。

例如:

# ll -Z

-rw-r--r-- root root ? a.file #没有SElinux上下文,没有ACL-rw-r--r--+ root root ? b.file #只有ACL,没有SElinux上下文-rw-------. root root system_u:object_r:admin_home_t:s0 my.cnf #只有SElinux上下文,没有ACL-rw-rw-r--+ root root unconfined_u:object_r:user_tmp_t:s0 dd.c #有SElinux上下文,有ACL

  • 1
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值