I have a daemon running as a normal user, that runs /etc/rc.d/mountd status once in a while to check if mountd is running. /var/run/mountd.pid is only readable by root however:
% ls -l /var/run/mountd.pid
-rw------- 1 root wheel 5 Mar 8 14:33 /var/run/mountd.pid
It's not that it contains secret information ;)
Can those permissions please be changed?
Created attachment 167853 [details]
Change permissions of mountd.pid to 0644
Unfortunately, mountd uses pidfile(3) which relies on file locking and making the file world-readable would allow any user to lock it in shared mode, possibly disturbing the scheme.
Thanks for the explanation Jilles.
Interestingly enough dhclient and nscd also set the permissions on their pidfiles to 644.