<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic issues with scripted inputs and secondary groups in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/issues-with-scripted-inputs-and-secondary-groups/m-p/148832#M30288</link>
    <description>&lt;P&gt;Customer has reported an issue with Splunk scripted inputs and setgroups. An very simple example would be I have a script $SPLUNK_HOME/bin/script called shaky.sh&lt;/P&gt;

&lt;P&gt;This just calls /tmp/test.sh which just contains "echo "hello world &lt;CODE&gt;date&lt;/CODE&gt;" &amp;gt;&amp;gt; /tmp/test.out&lt;/P&gt;

&lt;P&gt;# ls -l /tmp/test.out&lt;BR /&gt;
-rwxr-x---. 1 root gumby 27 Jul 16 14:46 /tmp/test.sh&lt;/P&gt;

&lt;P&gt;splunkd runs as user "splunk" and gumby is a secondary group.&lt;/P&gt;

&lt;P&gt;# id splunk&lt;BR /&gt;
uid=500(splunk) gid=500(splunk) groups=500(splunk),502(gumby)&lt;/P&gt;

&lt;P&gt;The script does not run and there are  lots of permission denied errors from the script in splunkd.log&lt;BR /&gt;
If user splunk is changed to have gumby as a primary group, it works as expected&lt;BR /&gt;
Is there away to get this working with a secondary group?&lt;/P&gt;</description>
    <pubDate>Fri, 18 Jul 2014 14:39:55 GMT</pubDate>
    <dc:creator>dshakespeare_sp</dc:creator>
    <dc:date>2014-07-18T14:39:55Z</dc:date>
    <item>
      <title>issues with scripted inputs and secondary groups</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/issues-with-scripted-inputs-and-secondary-groups/m-p/148832#M30288</link>
      <description>&lt;P&gt;Customer has reported an issue with Splunk scripted inputs and setgroups. An very simple example would be I have a script $SPLUNK_HOME/bin/script called shaky.sh&lt;/P&gt;

&lt;P&gt;This just calls /tmp/test.sh which just contains "echo "hello world &lt;CODE&gt;date&lt;/CODE&gt;" &amp;gt;&amp;gt; /tmp/test.out&lt;/P&gt;

&lt;P&gt;# ls -l /tmp/test.out&lt;BR /&gt;
-rwxr-x---. 1 root gumby 27 Jul 16 14:46 /tmp/test.sh&lt;/P&gt;

&lt;P&gt;splunkd runs as user "splunk" and gumby is a secondary group.&lt;/P&gt;

&lt;P&gt;# id splunk&lt;BR /&gt;
uid=500(splunk) gid=500(splunk) groups=500(splunk),502(gumby)&lt;/P&gt;

&lt;P&gt;The script does not run and there are  lots of permission denied errors from the script in splunkd.log&lt;BR /&gt;
If user splunk is changed to have gumby as a primary group, it works as expected&lt;BR /&gt;
Is there away to get this working with a secondary group?&lt;/P&gt;</description>
      <pubDate>Fri, 18 Jul 2014 14:39:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/issues-with-scripted-inputs-and-secondary-groups/m-p/148832#M30288</guid>
      <dc:creator>dshakespeare_sp</dc:creator>
      <dc:date>2014-07-18T14:39:55Z</dc:date>
    </item>
    <item>
      <title>Re: issues with scripted inputs and secondary groups</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/issues-with-scripted-inputs-and-secondary-groups/m-p/148833#M30289</link>
      <description>&lt;P&gt;A solution for this appears to be to use newgrp in a "here file" as a wrapper&lt;BR /&gt;
eg&lt;/P&gt;

&lt;P&gt;#!/bin/bash &lt;BR /&gt; &lt;BR /&gt;
newgrp gumby &amp;lt;&amp;lt; END &lt;BR /&gt;&lt;BR /&gt;
/tmp/shaky.sh &lt;BR /&gt;&lt;BR /&gt;
END&lt;/P&gt;</description>
      <pubDate>Fri, 18 Jul 2014 14:44:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/issues-with-scripted-inputs-and-secondary-groups/m-p/148833#M30289</guid>
      <dc:creator>dshakespeare_sp</dc:creator>
      <dc:date>2014-07-18T14:44:34Z</dc:date>
    </item>
  </channel>
</rss>

