From: "zhangjian (CG)" <zhangjian496@huawei.com>
To: <stfrench@microsoft.com>, <chuck.lever@oracle.com>, <bfields@redhat.com>
Cc: <linux-kernel@vger.kernel.org>, <linux-nfs@vger.kernel.org>
Subject: [Question] nfsacl: why deny owner mode when deny user
Date: Mon, 8 Dec 2025 17:56:01 +0800 [thread overview]
Message-ID: <b3ef1024-bc81-4436-ae65-f1bdaf07efe8@huawei.com> (raw)
In-Reply-To: <a4435153-eb55-4160-9b46-aa937cffa575@huawei.com>
When user read bit is denied by nfs4_setfacl, owner read bit is also
denied.
Example:
[root@localhost ~]# nfs4_getfacl test/a
# file: test/a
A::OWNER@:rwatTcCy
A::1000:rwatcy
A::GROUP@:rtcy
A::EVERYONE@:rtcy
[root@localhost ~]# nfs4_setfacl -a D::1000:r test/a
[root@localhost ~]# nfs4_getfacl test/a
# file: test/a
D::OWNER@:r
A::OWNER@:watTcCy
D::1000:r
A::1000:watcy
A::GROUP@:rtcy
A::EVERYONE@:rtcy
In function process_one_v4_ace, I see read bit is denied for owner:
case ACL_USER:
i = find_uid(state, state->users, ace->who);
if (ace->type == NFS4_ACE_ACCESS_ALLOWED_ACE_TYPE) {
allow_bits(&state->users->aces[i].perms, mask);
} else {
deny_bits(&state->users->aces[i].perms, mask);
mask = state->users->aces[i].perms.deny;
deny_bits(&state->owner, mask);
}
This change is commit in 09229ed. But I wonder why it is implemented
like this.
next prev parent reply other threads:[~2025-12-08 9:56 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-13 10:24 [PATCH] smb: client: fix first failure in negotiation after server reboot zhangjian (CG)
2025-06-13 10:44 ` zhangjian (CG)
[not found] ` <CAH2r5mshSVCms8hwJepT25jyYmF-qEKFp3mDdwYG1e7nXfs_2g@mail.gmail.com>
[not found] ` <TYPP153MB14907291155DA3320C8F6A909471A@TYPP153MB1490.APCP153.PROD.OUTLOOK.COM>
[not found] ` <186d442d-69db-4a52-b65b-f67370547c45@huawei.com>
2025-06-16 2:15 ` [EXTERNAL] " zhangjian (CG)
2025-12-08 9:56 ` zhangjian (CG) [this message]
2025-12-24 15:18 ` [Question] nfsacl: why deny owner mode when deny user Chuck Lever
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b3ef1024-bc81-4436-ae65-f1bdaf07efe8@huawei.com \
--to=zhangjian496@huawei.com \
--cc=bfields@redhat.com \
--cc=chuck.lever@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nfs@vger.kernel.org \
--cc=stfrench@microsoft.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®