From: Frank van Maarseveen <frankvm@frankvm.com>
To: Linux NFS mailing list <nfs@lists.sourceforge.net>
Subject: NFS3PROC_ACCESS bug in 2.6.x
Date: Sun, 6 Feb 2005 19:39:13 +0100 [thread overview]
Message-ID: <20050206183913.GA28176@janus> (raw)
Both server and client are the same machine and run unpatched
2.6.11-rc3. /proc/mounts says:
localhost:/loc/nfstest /mnt2 nfs rw,sync,v3,rsize=32768,wsize=32768,acregmin=0,acregmax=0,acdirmin=0,acdirmax=0,hard,udp,noac,nolock,addr=localhost 0 0
Problem is that we should have permission to create according to the
secondary group list but apparently we don't:
$ cd /mnt2/subdir
$ ls -ld .
drwxrwx--- 2 root owner 4096 Feb 6 18:39 .
$ id
uid=363(fvm) gid=215(sec) groups=215(sec),3972(owner),..
^^^
$ strace -e mkdir /bin/mkdir aap
mkdir("aap", 0777) = -1 EACCES (Permission denied)
/bin/mkdir: cannot create directory `aap': Permission denied
$ ls -al
total 8
drwxrwx--- 2 root owner 4096 Feb 6 18:39 .
drwxr-xr-x 7 root root 4096 Feb 6 18:39 ..
$ >pipo
bash: pipo: No such file or directory
$ strace touch pipo
...
open("pipo", O_WRONLY|O_NONBLOCK|O_CREAT|O_NOCTTY|O_LARGEFILE, 0666) = -1 EACCES (Permission denied)
(I give up, lets go back to the server side)
$ cd /loc/nfstest/subdir
$ ls -al
total 8
drwxrwx--- 2 root owner 4096 Feb 6 18:39 .
drwxr-xr-x 7 root root 4096 Feb 6 18:39 ..
$ strace -e mkdir /bin/mkdir aap
mkdir("aap", 0777) = 0
Problem was originally found on 2.6.10 and looks like a server problem
because of the following and because 2.4.28 as server worked. I have
tracked it down in 2.6.10 to the following client side call tree:
sys_mkdir() ->
vfs_mkdir() ->
may_create() ->
permission(MAY_WRITE | MAY_EXEC) ->
nfs_permission(MAY_WRITE | MAY_EXEC) ->
nfs_do_access(MAY_WRITE | MAY_EXEC):
nfs_access_get_cached(): -ENOENT
nfs3_proc_access(MAY_EXEC | MAY_WRITE | MAY_READ):
arg.access = 0x1f (everything except NFS3_ACCESS_EXECUTE)
RPC returns 0
res.access = 0x3 (NFS3_ACCESS_READ|NFS3_ACCESS_LOOKUP)
modify the cached mask: set it to 0x5 (MAY_EXEC | MAY_READ)
if ((0x1f & 0x5) == 0x3)
return 0;
-EACCES
I think the server forgot to mention NFS3_ACCESS_MODIFY or
NFS3_ACCESS_EXTEND for the directory (I'm too lazy to look it up in
the RFCs right now).
--
Frank
-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
_______________________________________________
NFS maillist - NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs
next reply other threads:[~2005-02-06 18:39 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-02-06 18:39 Frank van Maarseveen [this message]
2005-02-15 20:23 ` NFS3PROC_ACCESS bug in 2.6.x Frank van Maarseveen
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=20050206183913.GA28176@janus \
--to=frankvm@frankvm.com \
--cc=nfs@lists.sourceforge.net \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.