NFS locking failure (not the 2.1.127 thinko).

David Woodhouse (David.Woodhouse@mvhi.com)
Mon, 09 Nov 1998 12:31:51 +0000


For some reason, I can't use NFS locking on files that aren't world-readable.

The server complains like this:
fh_verify: testlock/file1 permission failure, acc=4, error=218103808

This is what I did:

devel2 /homes/dwmw2/testlock $ touch file1
devel2 /homes/dwmw2/testlock $ ls -l file1
-rw-rw-r-- 1 dwmw2 dwmw2 0 Nov 9 11:40 file1
devel2 /homes/dwmw2/testlock $ testlk -w file1
fcntl: ok

devel2 /homes/dwmw2/testlock $ chmod o-r file1
devel2 /homes/dwmw2/testlock $ testlk -w file1
fcntl: No locks available
devel2 /homes/dwmw2/testlock $ ls -l file1
-rw-rw---- 1 dwmw2 dwmw2 0 Nov 9 11:40 file1
devel2 /homes/dwmw2/testlock $ id
uid=2005(dwmw2) gid=2005(dwmw2) groups=2005(dwmw2),100(users),1000(html),101(integrale),1001(cvs)
devel2 /homes/dwmw2/testlock $

I thought that the way round this would be to make the directory
non-world-readable, but it still happens.

Using read locks instead doesn't help. Being root doesn't help. The
filesystem is exported with no_root_squash.

Client and server are both 2.1.127 with the trivial patch that I sent last
night to fix the timeout problems. knfsd is knfsd-981022, with the patches
posted by HJL at Fri, 6 Nov 1998 09:53:56 -0800 (PST). Client and server are
both running the rpc.kstatd contained therein.

Given that the only reason I spent the weekend mucking about with knfsd was so
that our users' mail spools could be locked, It's not been particularly useful
so far :)

Another problem I'm having is that the filesystems don't get properly exported
when the server is rebooted. Some clients seem to get excluded, and even though
the server is told to export 10.0.0.0/255.0.0.0, it seems to ignore some of
them, so they get refused access until they remount.

This is unfortunate as NFS is supposed to be stateless and let the clients
continue regardless.

---- ---- ----
David Woodhouse David.Woodhouse@mvhi.com Office: (+44) 1223 810302
Project Leader, Process Information Systems Mobile: (+44) 976 658355
Axiom (Cambridge) Ltd., Swaffham Bulbeck, Cambridge, CB5 0NA, UK.
finger dwmw2@ferret.lmh.ox.ac.uk for PGP key.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/