Description of problem: rpc.statd is running as root after installing nfs-utils rpm. Before installing nfs-utils package, "/var/lib/nfs/statd/sm" directory is not exist. rpc.statd does mkdir the directory when first starting of /etc/init.d/nfslock. Because the dir's owner is root, rpc.statd does not drop root privilege and outputs warning message to syslog. "statd running as root. chown to choose different user" Steps to Reproduce: 1.If you already install nfs-utils, erace it. # rpm -e nfs-utils 2.Install nfs-utils rpm. 3. # /etc/init.d/nfslock start 4. # ps -fp `cat /var/run/rpc.statd.pid` 5.See UID of rpc.statd Actual results: UID is root. Expected results: UID is rpcuser.
Created attachment 338929 [details] patch for nfs-utils.spec mkdir sm dir and chown it in postinstall script prevents rpc.statd from mkdir the directory with root privilege.
reproduced on nfs-utils-1.0.9-51.el5 using comment #0: [root@hp-dl2x170g6-01 ~]# ps -fp `cat /var/run/rpc.statd.pid` UID PID PPID C STIME TTY TIME CMD root 4095 1 0 01:15 ? 00:00:00 rpc.statd # vim /var/log/messages ... May 16 01:18:32 hp-dl2x170g6-01 rpc.statd[4179]: statd running as root. chown /var/lib/nfs/statd/sm to choose different user verified against nfs-utils-1.0.9-52.el5 on i386 and x86_64: [root@hp-xw6400-02 ~]# rpm -ivh nfs-utils-1.0.9-52.el5.x86_64.rpm Preparing... ########################################### [100%] package nfs-utils-1.0.9-52.el5.x86_64 is already installed [root@hp-xw6400-02 ~]# /etc/init.d/nfslock start Starting NFS statd: [ OK ] [root@hp-xw6400-02 ~]# ps -fp `cat /var/run/rpc.statd.pid` UID PID PPID C STIME TTY TIME CMD rpcuser 5447 1 0 01:26 ? 00:00:00 rpc.statd
An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on therefore solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHBA-2011-1048.html