Bugzilla – Bug 969152
Cannot enable rpc-statd.service
Last modified: 2016-04-22 08:56:53 UTC
I have a nfs mount with the following fstab options.
10.215.3.125:/srv/storage /mnt/storage nfs rw,noauto,user 0 0
Every time I try to mount the nfs share from dolphin a dialog for root permission is presented asking to start rpc-statd.service. If I start the service before, it works as expected and the nfs share is directly accessible on select from dolphin
The problem is that even if I execute
systemctl enable rpc-statd.service
it says that it is on disable state and doesn't start on reboot. I have to started it manually and it starts without issues.
systemctl status rpc-statd.service
● rpc-statd.service - NFS status monitor for NFSv2/3 locking.
Loaded: loaded (/usr/lib/systemd/system/rpc-statd.service; static; vendor preset: disabled)
Active: active (running) since Τετ 2016-03-02 17:34:29 EET; 4min 22s ago
Main PID: 20817 (rpc.statd)
Tasks: 1 (limit: 512)
└─20817 /usr/sbin/rpc.statd --no-notify
Μάρ 02 17:34:29 teras systemd: Starting NFS status monitor for NFSv2/3 locking....
Μάρ 02 17:34:29 teras rpc.statd: Version 1.3.3 starting
Μάρ 02 17:34:29 teras rpc.statd: Flags: TI-RPC
Μάρ 02 17:34:29 teras systemd: Started NFS status monitor for NFSv2/3 locking..
Am I missing something or the service activation is buggy? Thanks.
Sorry for the long delay in getting to this :-(
rpc.statd is supposed to be started automatically when you mount.
However you are using a "user" mount and so the "systemctl" command to start statd gets run as you rather than root.
So we just need to get /sbin/mount.nfs to set its uid properly before calling start-statd.
The reason that "systemctl enable rpc-statd.service" doesn't do anything is that /usr/lib/systemd/system/rpc-statd.service has no [INSTALL] section, so systemctl doesn't know how to enabled. It isn't meant to be enabled, it is meant to be started directly..
I've created a patch and it is building now. The packages should appear in
shortly. Can you please install the nfs-client package and let me know if it fixes the problem?
Perfect explanation, although from user side this was working on 42.1.
Patched package works as expected.
Thank you for the fix, I suppose it will pass soon in the Tumbleweed repo.
Thanks for testing.
I've sent the fix upsteeam, and into the opensuse system so it should appear in Tumbleweed eventually.
BTW the version I gave you has a security issue. If you set environment variables before running "mount" they will be inherited by /usr/sbin/start-statd which could be convinced to do something unintended as root.
The version I have submitted does not have the problem.
So if anyone but you uses that machine, you should revert to the old version.
This is an autogenerated message for OBS integration:
This bug (969152) was mentioned in
https://build.opensuse.org/request/show/391216 Factory / nfs-utils
Thanks for the security notification. It is only me, so I will probably wait for the official update to pass, until then I'll use the patched version.
Thanks again for the fix.