Getting Data In

UF: Why is too much permissions given to Splunk when configured as a systemd service?

GaetanVP
Contributor

Hello Splunkers,

I have followed this documentation in order to configure my Splunk on my UF as a systemd managed service : https://docs.splunk.com/Documentation/Splunk/9.0.3/Admin/RunSplunkassystemdservice

 I also followed the step to make Splunk running with a non-root user, and I have check with the following command that it is indeed the case :

 

 

ps -aux | grep -i Splunk

 

 

However, it seems that Splunk is now able to read any files and folders on the machine, even no permissions or ACL were specified for the splunk user I used.  This user does not have any sudo right, so I am wondering what could be the root cause here...

If I disable the systemd service and run Splunk with (as the non root user) :  

 

/opt/splunkforwarder/bin/splunk start

 

Everything is working correctly and the protected files / folder are not monitored by Splunk, as excepted.

I'm out of idea here!

Thanks,

GaetanVP

 

 

 

Labels (1)
0 Karma
1 Solution

richgalloway
SplunkTrust
SplunkTrust

This is a new feature of Splunk that allows UFs to read system logs without running as root.  To disable it, remove the CAP_DAC_READ_SEARCH capability from the systemd unit file. See https://docs.splunk.com/Documentation/Forwarder/9.0.3/Forwarder/Installleastprivileged

---
If this reply helps you, Karma would be appreciated.

View solution in original post

richgalloway
SplunkTrust
SplunkTrust

This is a new feature of Splunk that allows UFs to read system logs without running as root.  To disable it, remove the CAP_DAC_READ_SEARCH capability from the systemd unit file. See https://docs.splunk.com/Documentation/Forwarder/9.0.3/Forwarder/Installleastprivileged

---
If this reply helps you, Karma would be appreciated.

GaetanVP
Contributor

Wow I've never saw this parameter before... thanks a lot !
Worked as expected when I removed the line.

Regards,

GaetanVP

Get Updates on the Splunk Community!

Built-in Service Level Objectives Management to Bridge the Gap Between Service & ...

Wednesday, May 29, 2024  |  11AM PST / 2PM ESTRegister now and join us to learn more about how you can ...

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer at Splunk .conf24 ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...

Share Your Ideas & Meet the Lantern team at .Conf! Plus All of This Month’s New ...

Splunk Lantern is Splunk’s customer success center that provides advice from Splunk experts on valuable data ...