Bug 7390 - NFS4 strange permission behaviour
NFS4 strange permission behaviour
Status: REJECTED INSUFFICIENT_DATA
Product: File System
Classification: Unclassified
Component: NFS
i386 Linux
: P2 normal
Assigned To: bfields
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2006-10-20 03:21 UTC by Huemi
Modified: 2007-02-24 09:06 UTC (History)
2 users (show)

See Also:
Kernel Version: 2.6.19
Tree: Mainline
Regression: ---


Attachments

Description Huemi 2006-10-20 03:21:25 UTC
Most recent kernel where this bug did not occur: unknown
Distribution: gentoo (vanilla_sources)
Hardware Environment: 
Software Environment: nfs-utils 1.0.10, vanilla-sources 2.6.19 (+ patch from
http://bugzilla.kernel.org/show_bug.cgi?id=7385)
Problem Description:

I am able to read from and write into files on a nfs4 mount which I own as a
normal user without the appropriate permissions. If I use "normal" nfs (I think
it is nfs3) I can't read or write those files without the appropriate
permissions (which I think is the right behviour).

entries in /etc/export
/export *(rw,fsid=0,insecure,no_subtree_check,sync)
/export/bla *(rw,nohide,root_squash,insecure,no_subtree_check,async)
/export/user *(rw,nohide,root_squash,insecure,no_subtree_check,async

/export and /export/bla have group and owner root and chmod 0777

commands:
modprobe nfs
/etc/init.d/nfs start
/etc/init.d/nfsmount start
mount -t nfs4 127.0.0.1:/bla /bla
echo "hello world" > /bla/hello
chmod 0000 /bla/hello

cat /bla/hello will show "hello world
Comment 1 Daniel Drake 2006-10-20 05:00:57 UTC
Original report http://bugs.gentoo.org/show_bug.cgi?id=149493
Comment 2 bfields 2006-10-20 07:06:35 UTC
This bug has existed since the introduction of NFSv4 to the kernel.  It should
be fixed by 9801d8a39cfe6c34f39f9552a246a6bd002e735e and
dc730e173785e29b297aa605786c94adaffe2544, which will be in 2.6.19.
Comment 3 Huemi 2006-10-30 05:37:11 UTC
It doesn't work well. After installing the patch on the server, gnome and kde
don't work anymore on nfs4 mounted homes. kde hangs during startup and gnome
isn't able to create new files (although it is able to create new directories),
vi has also some problems. Temporary files are created with permissions 0000 and
so it is not able to read or write into those files.
Comment 4 bfields 2006-10-30 07:37:50 UTC
The previous patch exposed another bug: we're checking open permissions against
the mode even when a file was newly created by the open.  Should be fixed in
2.6.19-rc3-CITI_NFS4_ALL-2, but fix may need a little more thought before going
upstream.  See gitweb for the individual patches:

http://linux-nfs.org/cgi-bin/gitweb.cgi?p=bfields-2.6.git;a=shortlog;h=2.6.19-rc3-CITI_NFS4_ALL-2
Comment 5 Daniel Drake 2006-12-30 20:03:11 UTC
Is this fixed in Linus' tree yet?
Comment 6 bfields 2006-12-30 20:17:12 UTC
"Is this fixed in Linus' tree yet?"

Yes, sorry, it should be fixed in 2.6.19; could you confirm?
Comment 7 Adrian Bunk 2007-02-24 09:06:47 UTC
Please reopen this bug if it's still present with kernel 2.6.20.

Note You need to log in before you can comment on or make changes to this bug.