Re: NFS in 1.3.68

Jan Kasprzak (kas@muni.cz)
Tue, 27 Feb 1996 16:29:11 +0100 (MET)


:
: Unfortunately, I have had a few problems. With 1.3.68, while I was
: unpacking gcc into an NFS-mounted voulme, I got several "can't write file:
: permission denied" messages. When I unpacked it on the the NFS server, I
: had no problems and none of the files had strange permissions or
: ownerships. It was definitely reproduceable, however, the files that were
: permission denied changed each time I ran tar on the archive.
:
I think this is an error in nfs-server (at least if it is nfsd-2.1).
Did you got this "permission denied" error only when unpacking file which
was marked as read-only in tar archive? This can be a problem,
described in rfc 1094:

Another problem arises due to the usually stateful open operation.
Most operating systems check permission at open time, and then check
that the file is open on each read and write request. With stateless
servers, the server has no idea that the file is open and must do
permission checking on each read and write call. On a local
filesystem, a user can open a file and then change the permissions so
that no one is allowed to touch it, but will still be able to write
! to the file because it is open. On a remote filesystem, by contrast,
! the write would fail. To get around this problem, the server's
! permission checking algorithm should allow the owner of a file to
! access it regardless of the permission setting.

Linux nfsd (2.1 and 2.2beta* written by Olaf Kirch) does not follow
this recommendation. I wrote a small patch against 2.2beta11, which fixed
this problem for me. I've send it to Olaf, so we can hope it will be fixed
in next revision of nfsd (as well as the long-lasted segfault on SIGHUP
problem, which all 2.2's have).

If anyone is interested in this patch, send me mail to <kas@foresta.cz>
(not to the address listed below).

-Yenya

-- 
Jan "Yenya" Kasprzak  |  mailto:kas@muni.cz  |   http://www.fi.muni.cz/~kas/
[[[[ Student of Informatics, Faculty of Informatics, Masaryk University ]]]]
[[[[      Czech Linux Homepage:  http://www.fi.muni.cz/~kas/linux/      ]]]]
``I _like_ using goto's every once in a while:  it can often mess up the gcc
optimizer just enough to get better code out of it.''       --Linus Torvalds