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