Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 143204 - net-fs/nfs-utils - statd fails due to missing /var/lib/nfs/state
Summary: net-fs/nfs-utils - statd fails due to missing /var/lib/nfs/state
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Network Filesystems
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-08-08 06:11 UTC by Martin Parm
Modified: 2006-08-09 07:49 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
Creates /var/lib/nfs/state during installation (nfs-utils_add-state.patch,421 bytes, patch)
2006-08-08 06:14 UTC, Martin Parm
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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