Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 143204

Summary: net-fs/nfs-utils - statd fails due to missing /var/lib/nfs/state
Product: Gentoo Linux Reporter: Martin Parm <parmus>
Component: New packagesAssignee: Network Filesystems <net-fs>
Status: RESOLVED WORKSFORME    
Severity: normal    
Priority: High    
Version: 2006.0   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: Creates /var/lib/nfs/state during installation

Description Martin Parm 2006-08-08 06:11:54 UTC
After an out-of-the-box installation of nfs-utils statd (started from nfsmount) fails to start due to a missing /var/lib/nfs/state. statd would normally create this file itself, but /var/lib/nfs is only writable for root and statd runs as nobody.
The problem can be solved in one of two ways: (a) allowing nobody (or the root-group) to create files in /var/lib/nfs or (b) create an empty /var/lib/nfs/state during installation. The later seems more secure IMHO.

This problem exists in nfs-utils-1.0.6-r6. I haven't tested with later versions, but it's not fixed in the ebuilds as far as I can tell.
Comment 1 Martin Parm 2006-08-08 06:14:52 UTC
Created attachment 93747 [details, diff]
Creates /var/lib/nfs/state during installation

This patch fixes the problem by creating /var/lib/nfs/state during installation. The patch has been made with nfs-utils-1.0.6-r6.
Comment 2 SpanKY gentoo-dev 2006-08-08 19:18:26 UTC
if you look at pkg_postinst(), you'll see that this is already taken care of
Comment 3 Martin Parm 2006-08-09 06:03:17 UTC
Comment on attachment 93747 [details, diff]
Creates /var/lib/nfs/state during installation

Sorry, I obviously didn't do my homework.
This bug is actually a dublicate of #30486, which was resolved in 2004.

I actually did have a problem with a missing /var/lib/nfs/state, but the problem must be somewhere else.

Sorry for the inconvenience.
Comment 4 SpanKY gentoo-dev 2006-08-09 07:49:44 UTC
np, happens to everyone at some point