I'm running zabbix-agent on a centos 7 machine under user/group zabbix. I want to give the zabbix user access to a couple of log files in folders under:
/var/log
/usr/local/cpanel/logs/
What is the best way to give that user access to those files. Since for example /var/log/messages
is owned by root, I can't just chmod the files to zabbix. Also running the zabbix agent under root sounds like a bad plan.
What is the best approach? should I use setfacl? If I use setfacl, should I add rights to all preceding folders as well?
Thanks