lkml.org 
[lkml]   [1996]   [Nov]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: NFS client permission bug
On Mon, 11 Nov 1996, Matthias Urlichs wrote:

> 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.

The output to the file is done as root, since bash doesn't care whether
you are redirecting the output of echo 'foo' or su auser -c echo 'foo'
into the test file.

> 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.

The UID that opened it here is root. However there are bugs in NFS that
let open() work without adequate permissions, it seems, when UID 0
squashing is in effect.

-- Elliot

A: "Talk about stupidity!"
B: "Who, you?"
A: "No, me!"


\
 
 \ /
  Last update: 2005-03-22 13:37    [W:0.058 / U:0.608 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site