Bug 235006

Summary: net-mgmt/netdata run as user not recognized in the config file
Product: Ports & Packages Reporter: Dries Michiels <driesm.michiels>
Component: Individual Port(s)Assignee: Mahdi Mokhtari <mmokhi>
Status: In Progress ---    
Severity: Affects Only Me Flags: mmokhi: maintainer-feedback+
Priority: ---    
Version: Latest   
Hardware: Any   
OS: Any   

Description Dries Michiels 2019-01-16 19:42:34 UTC
When specifying the following option in the netdata config file:

        run as user = root

The daemon wont actually run as root. It needs to be set in rc.conf as netdata_user="root".

Is there a way to support setting this from the config file?
Comment 1 Dries Michiels 2019-01-20 11:06:46 UTC
As a side solution, if we could make it possible to alter the PID file location from a variable in rc.conf, this would already be a nice addition. 

: ${netdata_enable="NO"}
: ${netdata_user="netdata"}
: ${netdata_pid="/var/db/netdata/${name}.pid"}

pidfile = ${netdata_pid}
Comment 2 Mahdi Mokhtari freebsd_committer freebsd_triage 2019-04-06 11:48:40 UTC
I assume it's already landed in ports r496470
If so please tell me so I can close it.

Comment 3 Dries Michiels 2019-04-06 12:04:44 UTC
Hi, this issue is still relevant. Although I'm not sure how we can fix this.
Because the rc script uses daemon and does not probe for the "run as user" in "netdata.conf". If you want to run netdata as another user you have to set the netdata_user variable in rc.conf atm.