[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAPza5qdWzbNcBt7ZvUxtonB38v07cDVPkBOtdBPvK=3_Y+rWgg@mail.gmail.com>
Date: Thu, 15 Dec 2022 11:03:04 +0800
From: Chengen Du <chengen.du@...onical.com>
To: Trond Myklebust <trondmy@...merspace.com>
Cc: Anna Schumaker <anna@...nel.org>,
Charles Edward Lever <chuck.lever@...cle.com>,
Jeffrey Layton <jlayton@...nel.org>,
"linux-nfs@...r.kernel.org" <linux-nfs@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] NFS: fix client permission error after adding user to
permissible group
Hi Trond,
Thanks for your information.
Best regards,
Chengen Du
On Thu, Dec 15, 2022 at 3:42 AM Trond Myklebust <trondmy@...merspace.com> wrote:
>
>
>
> > On Dec 14, 2022, at 03:47, Chengen Du <chengen.du@...onical.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@...etic:~$ ls -ld /mnt/private/
> > drwxrwx--- 2 root testgroup 4096 Nov 24 08:23 /mnt/private/
> > testuser@...etic:~$ 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@...etic:~$ 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@...etic:~$ 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@...merspace.com
>
Powered by blists - more mailing lists