Red Hat Bugzilla – Bug 31801
NFS File Locking not working due to rpc.statd
Last modified: 2008-05-01 11:38:00 EDT
From Bugzilla Helper:
User-Agent: Mozilla/4.75 [en] (Windows NT 5.0; U)
rpc.statd appears very changed since 6.2 and now in affect does not
monitor any other machines. This in turn causes lockd not to behave
for remote locks, and thus NFS locking is toast.
The problem is that extra (and may I opine worthless) security was thrown
in rpc.statd to make it work somewhat like anon ftp. Specifically it now
chroots(".") where "." is /var/lib/nfs/statd (from a prior chdir call)
Well, needless to say hardly anything works after this. All calls to
libraries, /etc/hosts, etc. fail horribly w/ ENOENT since these are
no longer accessible.
The man page does NOT reflect any of these changes btw.
Steps to Reproduce:
1.install rh7.0 w/ NFS
2.mount a remote file system (example we use are our home dirs)
3.run "gnp" to see the lack of locking
4. or use strace to see the calls from rpc.statd
Actual Results: Error messages from both rpc.lockd and rpc.statd in
THe old 6.2 rpc.statd appears to work fine.
TO fix this I would suggest either:
1) remove the questionable chroot call
2) at install time, set up a correct "anon ftp" type environment
under /var/lib/nfs/statd (i.e. /etc w/ hosts? /lib /usr/lib etc)
*** Bug 31802 has been marked as a duplicate of this bug. ***
The chroot(2) bug will be fixed in the next release.