Re: NFS client permission bug

Matthias Urlichs (smurf@smurf.noris.de)
Mon, 11 Nov 1996 04:46:37 +0100


In linux.dev.kernel, article <Pine.LNX.3.95.961108011553.25921U-100000@moisil.wal.rhno.columbia.edu>,
Ion Badulescu <ionut@moisil.wal.rhno.columbia.edu> writes:

> > 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 #
>
> It's your root shell that creates the file! The output of the su command
> gets redirected, not the output of the echo command.
>
So what? The file is open, thus the echo should be able to write to it,
even though it's now runing as another user.

Quick fix for _this_ problem is to remember the uid of whoever opened the
file in the NFS file structure so that whoever writes to it can do so.

UNFORTUNATELY, since NFS is stateless this only helps partially. For
instance, you can easily move or chown the file on the server... which
breaks _any_ fix you do on the client.

NFS is stateless. This is an unfixable design mistake of NFS -- the Sun
programmers who did this, oh so many years ago, should simply have known
better.

Live with it, or write a better file sharing protocol.

-- 
I need a hug.
-- 
Matthias Urlichs         \  noris network GmbH  /  Xlink-POP Nürnberg 
Schleiermacherstraße 12   \   Linux+Internet   /   EMail: urlichs@noris.de
90491 Nürnberg (Germany)   \    Consulting+Programming+Networking+etc'ing
   PGP: 1024/4F578875   1B 89 E2 1C 43 EA 80 44  15 D2 29 CF C6 C7 E0 DE
       Click <A HREF="http://info.noris.de/~smurf/finger">here</A>.    42