I have a service running on my server (in this case, audio/icecast) via rc scripts. I want the non-root user to be able to see that Icecast is running.
As root, if I type:
it gives me this response:
As non-root, if I try the same:
instead I see:
This is (I guess) because security prevents non-root from seeing root's processes (e.g.
and now non-root can get icecast status.
This seems very heavy-handed though! I don't know if I want to make every user able to see every process, just to get status for this one service. So here's the question. What is the best way to make
As root, if I type:
service icecast status
it gives me this response:
Code:
icecast is running as pid 74983.
As non-root, if I try the same:
service icecast status
instead I see:
Code:
icecast is not running.
This is (I guess) because security prevents non-root from seeing root's processes (e.g.
ps a
does not show Icecast as non-root). Changing these sysctl settings lets me see it:
Code:
# sysctl security.bsd.see_other_uids=0
# sysctl security.bsd.see_other_gids=0
and now non-root can get icecast status.
This seems very heavy-handed though! I don't know if I want to make every user able to see every process, just to get status for this one service. So here's the question. What is the best way to make
service <name> status
work for non-root?