lkml.org 
[lkml]   [1996]   [Nov]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectNFS client permission bug
    [I posted this to a local news server but I'm not sure that it is correctly
    configured to relay messages to vger so I post it again directly to vger.
    Sorry if you receive this message twice.]

    If I open a file for writing on an NFS filesystem as root, then change the
    userid writes to the file will fail. The NFS filesystem is exported with
    full root privileges enabled. This happens with Ultrix Solaris and Lniux
    servers so it is an NFS client code probelm. E.g.

    neumann /ubackup # ls -l test
    ls: test: No such file or directory
    neumann /ubackup # su hzoli -c 'echo bad' > test
    zsh: write error: permission denied
    neumann /ubackup # ls -l test
    -rw-r--r-- 1 root root 0 Nov 6 18:52 test
    neumann /ubackup #

    There is no permission problems on normal filesystems. Ultrix and Solaris
    2.5 does not have this problem.

    But this behaviour is not consistent. I am in a directory owned by user
    hzoli userid 798. In zsh assigning EUID calls seteuid():

    neumann /ubackup # ls -l test
    ls: test: No such file or directory
    neumann ~ # (EUID=798 ; echo good ; EUID=1 ; echo bad) > test
    zsh: write error: permission denied
    zsh: write error: permission denied
    neumann ~ # ls -l test
    -rw-r--r-- 1 root root 0 Nov 6 19:04 test
    neumann ~ # rm test ; (EUID=798 ; touch test)
    neumann ~ # ls -l test
    -rw-r--r-- 1 hzoli root 0 Nov 6 19:04 test
    neumann ~ # (EUID=798 ; echo good ; EUID=1 ; echo bad) > test
    neumann ~ # ls -l test
    -rw-r--r-- 1 hzoli root 9 Nov 6 19:04 test
    neumann ~ # (echo good ; EUID=1 ; echo bad) > test
    zsh: write error: permission denied
    neumann ~ # ls -l test
    -rw-r--r-- 1 hzoli root 5 Nov 6 19:04 test

    Zoltan

    \
     
     \ /
      Last update: 2005-03-22 13:38    [W:0.022 / U:2.180 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site