--- ./fs/nfs/dir.c.orig 2005-07-29 14:03:07.000000000 +0200 +++ ./fs/nfs/dir.c 2005-07-29 14:03:31.000000000 +0200 @@ -1635,6 +1635,8 @@ cache.cred = cred; cache.jiffies = jiffies; status = NFS_PROTO(inode)->access(inode, &cache); + dfprintk(VFS, "NFS: access()=%d for ino %lu, cred %p, mask 0x%x->0x%x\n", + status, inode->i_ino, cred, mask, cache.mask); if (status != 0) return status; nfs_access_add_cache(inode, &cache); @@ -1680,7 +1682,12 @@ if (!NFS_PROTO(inode)->access) goto out_notsup; - cred = rpcauth_lookupcred(NFS_CLIENT(inode)->cl_auth, NULL, 0); + if (NFS_PROTO(inode)->version > 3) + cred = rpcauth_lookupcred(NFS_CLIENT(inode)->cl_auth, NULL, 0); + else { + struct rpc_groups fsg = { 1, { inode->i_gid } }; + cred = rpcauth_lookupcred(NFS_CLIENT(inode)->cl_auth, &fsg, 0); + } if (!IS_ERR(cred)) { res = nfs_do_access(inode, cred, mask); put_rpccred(cred);