setfacl rwx权限不会覆盖默认权限

时间:2016-05-19 13:16:04

标签: linux unix redhat

[user4@localhost /]$ getfacl /accounting
getfacl: Removing leading '/' from absolute path names
# file: accounting
# owner: root
# group: accounting
# flags: -st
user::rwx
user:user4:rwx
group::rwx
mask::rwx
other::---
default:user::rwx
default:user:user4:rwx
default:group::rwx
default:mask::rwx
default:other::---

用户4应该能够修改/ accounting目录中任何用户创建的任何文件。但是,当他试图这样做时,它表示许可被拒绝。

[user4@localhost /]$ cd /accounting/
[user4@localhost accounting]$ ll
total 8
-rw-r-----+ 1 user1 accounting 0 May 19 18:28 1
[user4@localhost accounting]$ echo hello >> 1
bash: 1: Permission denied
[user4@localhost accounting]$ 

我是新手,我不确定我做错了什么。请帮忙!感谢大家。

1 个答案:

答案 0 :(得分:0)

  

用户4应该能够修改/ accounting目录中任何用户创建的任何文件。

不正确的。目录权限仅适用于目录操作,而不适用于其中包含的任何文件。因此,虽然user4可以删除目录中的文件(因为这是一个目录操作),但是他们无法修改他们没有明确权限的文件。