lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2B6CD9C5-EE21-4275-9F6E-AF1C1C5E164F@hammerspace.com>
Date:   Wed, 14 Dec 2022 19:41:54 +0000
From:   Trond Myklebust <trondmy@...merspace.com>
To:     Chengen Du <chengen.du@...onical.com>
CC:     Trond Myklebust <trondmy@...merspace.com>,
        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



> 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

Powered by Openwall GNU/*/Linux Powered by OpenVZ