gpt4 book ai didi

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

转载 作者:太空宇宙 更新时间:2023-11-04 12:50:34 26 4
gpt4 key购买 nike

[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]$

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

最佳答案

User 4 should be able to modify any file created by any users inside the /accounting directory.

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

关于linux - setfacl rwx权限不会覆盖默认权限,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37324361/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com