From: Trond Myklebust <trondmy@hammerspace.com>
To: Chengen Du <chengen.du@canonical.com>
Cc: Trond Myklebust <trondmy@hammerspace.com>,
Anna Schumaker <anna@kernel.org>,
Charles Edward Lever <chuck.lever@oracle.com>,
Jeffrey Layton <jlayton@kernel.org>,
"linux-nfs@vger.kernel.org" <linux-nfs@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] NFS: fix client permission error after adding user to permissible group
Date: Wed, 14 Dec 2022 19:41:54 +0000 [thread overview]
Message-ID: <2B6CD9C5-EE21-4275-9F6E-AF1C1C5E164F@hammerspace.com> (raw)
In-Reply-To: <20221214084730.296936-1-chengen.du@canonical.com>
> On Dec 14, 2022, at 03:47, Chengen Du <chengen.du@canonical.com> wrote:
>
> The access cache only expires if either NFS_INO_INVALID_ACCESS flag is on
> or timeout (without delegation).
> Adding a user to a group in the NFS server will not cause any file
> attributes to change.
> The client will encounter permission errors until other file attributes
> are changed or the memory cache is dropped.
>
> Steps to reproduce the issue:
> 1.[client side] testuser is not part of testgroup
> testuser@kinetic:~$ ls -ld /mnt/private/
> drwxrwx--- 2 root testgroup 4096 Nov 24 08:23 /mnt/private/
> testuser@kinetic:~$ mktemp -p /mnt/private/
> mktemp: failed to create file via template
> ‘/mnt/private/tmp.XXXXXXXXXX’: Permission denied
> 2.[server side] add testuser into testgroup, which has access to folder
> root@kinetic:~$ usermod -aG testgroup testuser &&
> echo `date +'%s'` > /proc/net/rpc/auth.unix.gid/flush
> 3.[client side] create a file again but still fail
> testuser@kinetic:~$ mktemp -p /mnt/private/
> mktemp: failed to create file via template
> ‘/mnt/private/tmp.XXXXXXXXXX’: Permission denied
>
Thanks, but the correct way to deal with this is to log out and log back in again, the way the POSIX gods intended. See commit 0eb43812c027 ("NFS: Clear the file access cache upon login”).
_________________________________
Trond Myklebust
Linux NFS client maintainer, Hammerspace
trond.myklebust@hammerspace.com
next prev parent reply other threads:[~2022-12-14 19:42 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-14 8:47 Chengen Du
2022-12-14 19:41 ` Trond Myklebust [this message]
2022-12-15 3:03 ` Chengen Du
-- strict thread matches above, loose matches on Subject: below --
2022-12-13 10:02 Chengen Du
2022-12-13 12:13 ` kernel test robot
2022-12-13 12:54 ` kernel test robot
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=2B6CD9C5-EE21-4275-9F6E-AF1C1C5E164F@hammerspace.com \
--to=trondmy@hammerspace.com \
--cc=anna@kernel.org \
--cc=chengen.du@canonical.com \
--cc=chuck.lever@oracle.com \
--cc=jlayton@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nfs@vger.kernel.org \
/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®