Security

splunk 6.1.X boot-start: running with group root (CentOS 6.5) - how force another group?

tugnet
Explorer

hi!

Since splunk 6.1.1 we encounter a problem because boot-start creates an init-script which causes the splunk process to run as user splunk - but group 0 (root) - but the files to be indexed are only available to the group splunk.

Is there a way to force the splunk-process to run as splunk:splunk?

something like

SPLUNK_OS_GROUP=splunk

(which doesn't work) in etc/splunk-launch.conf ?

regards,

philipp

0 Karma

grijhwani
Motivator

This is actually a generic unix/Linux admin question. Init scripts run as root. What the parameters of the splunk user are is totally irrelevant to a default init script.

You have two options:

  1. hack /etc/init.d/splunk to execute the splunk binary as the splunk user (look up su -c)
  2. set the SGID bit on the splunk executable, and while you're at it the SUID bit too (chmod ug+s ~splunk/bin/splunk), and make sure it is properly owned as splunk:splunk.

Mind you allowing it to continue running as root should not pose any problem in itself. Although normally frowned on for service processes, if you are looking to index system logs at all it is going to need root privelege unless you have been clever with log priveleges, and that can be an equally big minefield.

0 Karma

tugnet
Explorer

hi!

it has. but nontheless, the group the splunk process runs as is root (splunk:root). And that's not cool 😕

0 Karma

musskopf
Builder

Check the user Splunk, just run on Linux:
id splunk
and confirm the user has gid=splunk as primary group.

0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

[Puzzles] Solve, Learn, Repeat: Matching cron expressions

This puzzle (first published here) is based on matching timestamps to cron expressions.All the timestamps ...

Design, Compete, Win: Submit Your Best Splunk Dashboards for a .conf26 Pass

Hello Splunkers,  We’re excited to kick off a Splunk Dashboard contest! We know that dashboards are a primary ...

May 2026 Splunk Expert Sessions: Security & Observability

Level Up Your Operations: May 2026 Splunk Expert Sessions Whether you are refining your security posture or ...