Centos, how to install to run as unprivileged user?

Hi,

When I install filebeat via yum install ./filebeat-7.4.2-x86_64.rpm the service is running as root.
In the past I always edited /usr/lib/systemd/system/filebeat.service adding

User=filebeat
Group=filebeat

in [Service] section.

Is there any way to give the installation process the target user and group which should run filebeat service? It's a nasty post install/update task I want to get rid of because it is always trouble if we forget it.

Thanks, Andreas

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.