<?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 Re: Splunk unable to read specific files even though it can when started from the command line in Security</title>
    <link>https://community.splunk.com/t5/Security/Splunk-unable-to-read-specific-files-even-though-it-can-when/m-p/176044#M5228</link>
    <description>&lt;P&gt;Hi Brian,&lt;/P&gt;

&lt;P&gt;Do you know when a patch will be released?  Is it a simple modification to the /etc/init.d script?  I see that the 6.1.x script is missing "/bin/su - splunk -c".&lt;/P&gt;

&lt;P&gt;As far as the workaround goes - I assume it won't survive a server reboot?&lt;/P&gt;

&lt;P&gt;I also noticed that the files splunk it attempting to read need the splunk user to at least have standard read granted.  The ACL access is not enough.&lt;/P&gt;

&lt;P&gt;thanks,&lt;BR /&gt;
Chris&lt;/P&gt;</description>
    <pubDate>Mon, 25 Aug 2014 21:09:57 GMT</pubDate>
    <dc:creator>ccglanville</dc:creator>
    <dc:date>2014-08-25T21:09:57Z</dc:date>
    <item>
      <title>Splunk unable to read specific files even though it can when started from the command line</title>
      <link>https://community.splunk.com/t5/Security/Splunk-unable-to-read-specific-files-even-though-it-can-when/m-p/176042#M5226</link>
      <description>&lt;P&gt;Scenario:&lt;/P&gt;

&lt;P&gt;Running Splunk 6.1.x (either the forwarder or indexer)&lt;/P&gt;

&lt;P&gt;Using /etc/init.d/splunk to start/stop Splunk as user splunk (i.e. ./splunk enable boot-start -user splunk)&lt;/P&gt;

&lt;P&gt;In order to read root owned files and keep Splunk running as non-root, I've chowned certain files as root:splunk.  For example:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;-rw-r----- 1 root splunk  3726 Aug  8 07:01 cron
-rw-r----- 1 root splunk 25850 Aug  8 07:41 messages
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I can read the files from the command line just fine.  But Splunk can't read them - I'm getting the following errors:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;08-08-2014 06:40:54.703 -0700 WARN TailingProcessor - Insufficient permissions to read file='/var/log/cron' (hint: Permission denied). 
08-08-2014 06:40:54.704 -0700 WARN TailingProcessor - Insufficient permissions to read file='/var/log/messages' (hint: Permission denied). 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;What gives?&lt;/P&gt;</description>
      <pubDate>Fri, 08 Aug 2014 11:54:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Security/Splunk-unable-to-read-specific-files-even-though-it-can-when/m-p/176042#M5226</guid>
      <dc:creator>bosburn_splunk</dc:creator>
      <dc:date>2014-08-08T11:54:54Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk unable to read specific files even though it can when started from the command line</title>
      <link>https://community.splunk.com/t5/Security/Splunk-unable-to-read-specific-files-even-though-it-can-when/m-p/176043#M5227</link>
      <description>&lt;P&gt;A bug has been identified (SPL-87651) where using /etc/init.d/splunk that has been set up by ./splunk enable boot-start -user splunk isn't applying the right GID when accessing files.&lt;/P&gt;

&lt;P&gt;This can be worked around as starting Splunk using the user splunk and $SPLUNK_HOME/bin/splunk start vs. /etc/init.d/splunk.&lt;/P&gt;

&lt;P&gt;Brian&lt;/P&gt;</description>
      <pubDate>Fri, 08 Aug 2014 11:55:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Security/Splunk-unable-to-read-specific-files-even-though-it-can-when/m-p/176043#M5227</guid>
      <dc:creator>bosburn_splunk</dc:creator>
      <dc:date>2014-08-08T11:55:13Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk unable to read specific files even though it can when started from the command line</title>
      <link>https://community.splunk.com/t5/Security/Splunk-unable-to-read-specific-files-even-though-it-can-when/m-p/176044#M5228</link>
      <description>&lt;P&gt;Hi Brian,&lt;/P&gt;

&lt;P&gt;Do you know when a patch will be released?  Is it a simple modification to the /etc/init.d script?  I see that the 6.1.x script is missing "/bin/su - splunk -c".&lt;/P&gt;

&lt;P&gt;As far as the workaround goes - I assume it won't survive a server reboot?&lt;/P&gt;

&lt;P&gt;I also noticed that the files splunk it attempting to read need the splunk user to at least have standard read granted.  The ACL access is not enough.&lt;/P&gt;

&lt;P&gt;thanks,&lt;BR /&gt;
Chris&lt;/P&gt;</description>
      <pubDate>Mon, 25 Aug 2014 21:09:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Security/Splunk-unable-to-read-specific-files-even-though-it-can-when/m-p/176044#M5228</guid>
      <dc:creator>ccglanville</dc:creator>
      <dc:date>2014-08-25T21:09:57Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk unable to read specific files even though it can when started from the command line</title>
      <link>https://community.splunk.com/t5/Security/Splunk-unable-to-read-specific-files-even-though-it-can-when/m-p/176045#M5229</link>
      <description>&lt;P&gt;Per Kyle from support's recommendation, I modified the init script to use /bin/su like in the older 6.0.x scripts and it looks like it's fixed the issue as a stop-gap solution. I am running Splunk Enterprise 6.1.3.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;#!/bin/sh
#
# /etc/init.d/splunk
# init script for Splunk.
# generated by 'splunk enable boot-start'.
#
# chkconfig: 2345 90 60
# description: Splunk indexer service
#
RETVAL=0

. /etc/init.d/functions

splunk_start() {
  echo Starting Splunk...
  /bin/su - splunk -c "\"/opt/splunkforwarder/bin/splunk\" start --no-prompt --answer-yes"
  RETVAL=$?
  [ $RETVAL -eq 0 ] &amp;amp;&amp;amp; touch /var/lock/subsys/splunk
}
splunk_stop() {
  echo Stopping Splunk...
  /bin/su - splunk -c "\"/opt/splunkforwarder/bin/splunk\" stop "
  RETVAL=$?
  [ $RETVAL -eq 0 ] &amp;amp;&amp;amp; rm -f /var/lock/subsys/splunk
}
splunk_restart() {
  echo Restarting Splunk...
  /bin/su - splunk -c "\"/opt/splunkforwarder/bin/splunk\" restart "
  RETVAL=$?
  [ $RETVAL -eq 0 ] &amp;amp;&amp;amp; touch /var/lock/subsys/splunk
}
splunk_status() {
  echo Splunk status:
  /bin/su - splunk -c "\"/opt/splunkforwarder/bin/splunk\" status "
  RETVAL=$?
}
case "$1" in
  start)
    splunk_start
    ;;
  stop)
    splunk_stop
    ;;
  restart)
    splunk_restart
    ;;
  status)
    splunk_status
    ;;
  *)
    echo "Usage: $0 {start|stop|restart|status}"
    exit 1
    ;;
esac

exit $RETVAL
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 09 Sep 2014 00:20:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Security/Splunk-unable-to-read-specific-files-even-though-it-can-when/m-p/176045#M5229</guid>
      <dc:creator>fharding</dc:creator>
      <dc:date>2014-09-09T00:20:47Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk unable to read specific files even though it can when started from the command line</title>
      <link>https://community.splunk.com/t5/Security/Splunk-unable-to-read-specific-files-even-though-it-can-when/m-p/176046#M5230</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;
does it work with other agent versions ?&lt;BR /&gt;
thanks&lt;/P&gt;</description>
      <pubDate>Tue, 24 Mar 2015 15:46:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Security/Splunk-unable-to-read-specific-files-even-though-it-can-when/m-p/176046#M5230</guid>
      <dc:creator>blebit</dc:creator>
      <dc:date>2015-03-24T15:46:28Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk unable to read specific files even though it can when started from the command line</title>
      <link>https://community.splunk.com/t5/Security/Splunk-unable-to-read-specific-files-even-though-it-can-when/m-p/176047#M5231</link>
      <description>&lt;P&gt;Guys , is this post relevant to the eval version of Enterprise 6.2.2 Build 255606 ? I am running on redhat 6.5 ([root@splunk01 ~]# uname -a  - RESULT IS- Linux splunk01 2.6.32-431.el6.x86_64 #1 SMP Sun Nov 10 22:19:54 EST 2013 x86_64 x86_64 x86_64 GNU/Linux.)&lt;/P&gt;

&lt;P&gt;Install file is       splunk-6.2.3-264376-linux-2.6-x86_64.rpm&lt;/P&gt;

&lt;P&gt;I installed the enterprise version of splunk as root, but ran into problems with the configuration of the splunk add on for unix looping and never saying successful. A post here on the forum suggested that this was a permissions issue and i needed to install as a non-root user so that is what i did.&lt;/P&gt;

&lt;P&gt;I have fixed the splunk script as stated above and I still get a mass of permissions problems that i frankly am baffled by. This occurs if installing as root, splunker (a user i created) and splunkcreated by the rpm install&lt;/P&gt;

&lt;P&gt;[splunk@splunk01 ~]$ /bin/su - splunk -c "\"/opt/splunk/bin/splunk\" start --no-prompt --answer-yes"&lt;BR /&gt;
Password:&lt;BR /&gt;
Cannot open file=/opt/splunk/etc/system/local/server.conf for parsing: Permission denied&lt;BR /&gt;
Cannot create username mapping file: /opt/splunk/etc/users/users.ini: Permission denied&lt;BR /&gt;
Cannot open file=/opt/splunk/etc/users/users.ini for parsing: Permission denied&lt;BR /&gt;
Error opening username mapping file: /opt/splunk/etc/users/users.ini&lt;BR /&gt;
Cannot initialize: /opt/splunk/etc/system/metadata/local.meta: Permission denied&lt;BR /&gt;
Cannot initialize: /opt/splunk/etc/apps/learned/metadata/local.meta: Permission denied&lt;BR /&gt;
Cannot open file=/opt/splunk/etc/system/local/server.conf for parsing: Permission denied&lt;BR /&gt;
Cannot create username mapping file: /opt/splunk/etc/users/users.ini: Permission denied&lt;BR /&gt;
Cannot open file=/opt/splunk/etc/users/users.ini for parsing: Permission denied&lt;BR /&gt;
Error opening username mapping file: /opt/splunk/etc/users/users.ini&lt;BR /&gt;
Cannot initialize: /opt/splunk/etc/system/metadata/local.meta: Permission denied&lt;BR /&gt;
Cannot initialize: /opt/splunk/etc/apps/learned/metadata/local.meta: Permission denied&lt;BR /&gt;
Cannot open file=/opt/splunk/etc/system/local/server.conf for parsing: Permission denied&lt;BR /&gt;
Cannot create username mapping file: /opt/splunk/etc/users/users.ini: Permission denied&lt;BR /&gt;
Cannot open file=/opt/splunk/etc/users/users.ini for parsing: Permission denied&lt;BR /&gt;
Error opening username mapping file: /opt/splunk/etc/users/users.ini&lt;BR /&gt;
Cannot initialize: /opt/splunk/etc/system/metadata/local.meta: Permission denied&lt;BR /&gt;
Cannot initialize: /opt/splunk/etc/apps/learned/metadata/local.meta: Permission denied&lt;BR /&gt;
Pid file "/opt/splunk/var/run/splunk/splunkd.pid" unreadable.: Permission denied&lt;BR /&gt;
Pid file "/opt/splunk/var/run/splunk/splunkd.pid" unreadable.: Permission denied&lt;/P&gt;

&lt;P&gt;Splunk&amp;gt; Now with more code!&lt;/P&gt;

&lt;P&gt;Checking prerequisites...&lt;BR /&gt;
Cannot open file=/opt/splunk/etc/system/local/server.conf for parsing: Permission denied&lt;BR /&gt;
Cannot create username mapping file: /opt/splunk/etc/users/users.ini: Permission denied&lt;BR /&gt;
Cannot open file=/opt/splunk/etc/users/users.ini for parsing: Permission denied&lt;BR /&gt;
Error opening username mapping file: /opt/splunk/etc/users/users.ini&lt;BR /&gt;
Cannot initialize: /opt/splunk/etc/system/metadata/local.meta: Permission denied&lt;BR /&gt;
Cannot initialize: /opt/splunk/etc/apps/learned/metadata/local.meta: Permission denied&lt;BR /&gt;
Pid file "/opt/splunk/var/run/splunk/splunkweb.pid" unreadable.: Permission denied&lt;BR /&gt;
        Checking http port [8000]: Cannot open file=/opt/splunk/etc/system/local/server.conf for parsing: Permission denied&lt;BR /&gt;
Cannot create username mapping file: /opt/splunk/etc/users/users.ini: Permission denied&lt;BR /&gt;
Cannot open file=/opt/splunk/etc/users/users.ini for parsing: Permission denied&lt;BR /&gt;
Error opening username mapping file: /opt/splunk/etc/users/users.ini&lt;BR /&gt;
Cannot initialize: /opt/splunk/etc/system/metadata/local.meta: Permission denied&lt;BR /&gt;
Cannot initialize: /opt/splunk/etc/apps/learned/metadata/local.meta: Permission denied&lt;BR /&gt;
open&lt;BR /&gt;
        Checking mgmt port [8089]: Cannot open file=/opt/splunk/etc/system/local/server.conf for parsing: Permission denied&lt;BR /&gt;
Cannot create username mapping file: /opt/splunk/etc/users/users.ini: Permission denied&lt;BR /&gt;
Cannot open file=/opt/splunk/etc/users/users.ini for parsing: Permission denied&lt;BR /&gt;
Error opening username mapping file: /opt/splunk/etc/users/users.ini&lt;BR /&gt;
Cannot initialize: /opt/splunk/etc/system/metadata/local.meta: Permission denied&lt;BR /&gt;
Cannot initialize: /opt/splunk/etc/apps/learned/metadata/local.meta: Permission denied&lt;BR /&gt;
open&lt;BR /&gt;
        Checking appserver port [127.0.0.1:8065]: Cannot open file=/opt/splunk/etc/system/local/server.conf for parsing: Permission denied&lt;BR /&gt;
Cannot create username mapping file: /opt/splunk/etc/users/users.ini: Permission denied&lt;BR /&gt;
Cannot open file=/opt/splunk/etc/users/users.ini for parsing: Permission denied&lt;BR /&gt;
Error opening username mapping file: /opt/splunk/etc/users/users.ini&lt;BR /&gt;
Cannot initialize: /opt/splunk/etc/system/metadata/local.meta: Permission denied&lt;BR /&gt;
Cannot initialize: /opt/splunk/etc/apps/learned/metadata/local.meta: Permission denied&lt;BR /&gt;
open&lt;BR /&gt;
ERROR - Failed opening "/opt/splunk/var/log/splunk/splunkd-utility.log": Permission denied&lt;BR /&gt;
        Checking configuration... Error while parsing '/opt/splunk/etc/myinstall/splunkd.xml':&lt;BR /&gt;
 [Errno 13] Permission denied: '/opt/splunk/etc/myinstall/splunkd.xml'&lt;/P&gt;

&lt;P&gt;There were problems with the configuration files.&lt;BR /&gt;
Would you like to ignore these errors? [y/n]: y&lt;BR /&gt;
Done.&lt;BR /&gt;
                Creating: /opt/splunk/var/run/splunk/appserver/i18n&lt;BR /&gt;
Warning: cannot create "/opt/splunk/var/run/splunk/appserver/i18n"&lt;BR /&gt;
[splunk@splunk01 ~]$&lt;/P&gt;

&lt;P&gt;Regards Kevin&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 20:13:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Security/Splunk-unable-to-read-specific-files-even-though-it-can-when/m-p/176047#M5231</guid>
      <dc:creator>kevbod</dc:creator>
      <dc:date>2020-09-29T20:13:18Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk unable to read specific files even though it can when started from the command line</title>
      <link>https://community.splunk.com/t5/Security/Splunk-unable-to-read-specific-files-even-though-it-can-when/m-p/176048#M5232</link>
      <description>&lt;P&gt;I'm on 7.3.1 (universal forwarder) and have this problem. The workaround proposed below by @fharding worked for me.&lt;/P&gt;</description>
      <pubDate>Tue, 17 Sep 2019 10:03:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Security/Splunk-unable-to-read-specific-files-even-though-it-can-when/m-p/176048#M5232</guid>
      <dc:creator>BARNEYRUDD</dc:creator>
      <dc:date>2019-09-17T10:03:05Z</dc:date>
    </item>
  </channel>
</rss>

