Refine your search:

I need to run splunk as non-root user as per security policy of the customer. The challenge I have faced is with Syslog-ng.
if Syslog-ng runs as root, Splunk (running as non-root) cannot reald the logs collected sittign in varlog (owner is root)

So the idea is to run syslog-ng as non-root user (let's say the user that is running splunk) which should allow splunk running with the same non-root user to read the syslog files.

is this feasible? anyone has seen/done this before?

thanks

asked 04 Apr '12, 05:51

jnassar's gravatar image

jnassar
11
accept rate: 0%


2 Answers:

Not really familiar with syslog-ng, but if you use logrotate for rotating logs, you can set file permissions on the logs each time they rotate to 640 (rw-r--r--) with the owner of syslog-ng (or whatever account you use) and group of splunk.

In your logrotate.d-scripts you could add

create 640 syslog-ng splunk

Hope this helps,

Kristian

link

answered 04 Apr '12, 06:39

kristian.kolb's gravatar image

kristian.kolb
10.2k616
accept rate: 33%

i think the better option is of course to not run things as root when they dont need to, better yet, non-root in chroot environment is ideal. start syslog-ng per the link i provided. i will also suggest to run syslog-ng not as same uid as splunkd. you can configure syslog-ng.conf with destination owner,group,perm settings for the files. files should be owned by syslog, grouped with splunkd uid, and perms 640. so, you can run syslog-ng as one uid, splunkd as another uid, and you can have syslog-ng write files using yet another uid, etc. do not rely on logrotate to handle owner,group,perm.

(04 Apr '12, 07:12) cvajs
link

answered 04 Apr '12, 06:00

cvajs's gravatar image

cvajs
24128
accept rate: 5%

Post your answer
toggle preview

Follow this question

Log In to enable email subscriptions

RSS:

Answers

Answers + Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "Title")
  • image?![alt text](/path/img.jpg "Title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×511
×26
×5

Asked: 04 Apr '12, 05:51

Seen: 1,264 times

Last updated: 04 Apr '12, 07:16

Copyright © 2005-2012 Splunk Inc. All rights reserved.