Bug 235006 - net-mgmt/netdata run as user not recognized in the config file
Summary: net-mgmt/netdata run as user not recognized in the config file
Status: In Progress
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Mahdi Mokhtari
Depends on:
Reported: 2019-01-16 19:42 UTC by Dries Michiels
Modified: 2019-04-06 12:04 UTC (History)
0 users

See Also:
mmokhi: maintainer-feedback+


Note You need to log in before you can comment on or make changes to this bug.
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.