<?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: Can't write file &amp;quot;/root/.splunk/ in Installation</title>
    <link>https://community.splunk.com/t5/Installation/Can-t-write-file-quot-root-splunk/m-p/527772#M6850</link>
    <description>&lt;P&gt;Thats correct. it worked for me when I used splunk command as splunk user without sudo.&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;</description>
    <pubDate>Tue, 03 Nov 2020 16:05:03 GMT</pubDate>
    <dc:creator>sramiz</dc:creator>
    <dc:date>2020-11-03T16:05:03Z</dc:date>
    <item>
      <title>Can't write file "/root/.splunk/</title>
      <link>https://community.splunk.com/t5/Installation/Can-t-write-file-quot-root-splunk/m-p/527564#M6842</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;Splunk version is 8.0.6. trying to configure searchHead to connect to deployer. running following command but getting an error.&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000FF"&gt;&lt;EM&gt;sudo /opt/splunk/bin/splunk init shcluster-config -auth admin:password1 -mgmt_uri &lt;A href="https://10.31.0.28:8089" target="_blank" rel="noopener"&gt;https://10.31.0.28:8089&lt;/A&gt; -replication_port 9000 -replication_factor 3 -conf_deploy_fetch_url &lt;A href="http://10.31.0.33:8089" target="_blank" rel="noopener"&gt;http://10.31.0.33:8089&lt;/A&gt; -secret password1 -shcluster_label stg-shcluster1&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;Can't write file "/root/.splunk/authToken_hostname1_8089": Permission denied&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;splunk is running as a splunk user and have configured boot-start in systemd&lt;/P&gt;&lt;P&gt;Note:&lt;/P&gt;&lt;P&gt;1. I have read previous posts about similar error but their case is different than mine, i am not starting or have not started splunk as root user.&lt;/P&gt;&lt;P&gt;2. I have already added /opt/splunk/bin/splunk command in /etc/sudoers file to allow splunk user.&lt;/P&gt;&lt;P&gt;any suggestions?&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;SR&lt;/P&gt;</description>
      <pubDate>Mon, 02 Nov 2020 16:42:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Installation/Can-t-write-file-quot-root-splunk/m-p/527564#M6842</guid>
      <dc:creator>sramiz</dc:creator>
      <dc:date>2020-11-02T16:42:18Z</dc:date>
    </item>
    <item>
      <title>Re: Can't write file "/root/.splunk/</title>
      <link>https://community.splunk.com/t5/Installation/Can-t-write-file-quot-root-splunk/m-p/527762#M6849</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;1st stop splunk and after that sudo chown -R splunk:splunk /opt/splunk. Then start it again.&lt;/P&gt;&lt;P&gt;In your example you are trying to do that initialisation as root. Only time when you should use user root is enable boot-start (or start/stop/restart with systemd). &amp;nbsp;&lt;/P&gt;&lt;P&gt;The error message shows that for some reason it try to write some status information to /root/.splunk directory which didn't succeed as splunk is running as user splunk not as root.&lt;/P&gt;&lt;P&gt;You should do sudo -u splunk bash then run those command as user splunk.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I propose you to use DNS names instead of IP address for hosts.&lt;/P&gt;&lt;P&gt;When you are adding -conf_deploy_fetch_url you must ensure that this server is up and running.&lt;/P&gt;&lt;P&gt;r. Ismo&lt;/P&gt;</description>
      <pubDate>Tue, 03 Nov 2020 15:26:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Installation/Can-t-write-file-quot-root-splunk/m-p/527762#M6849</guid>
      <dc:creator>isoutamo</dc:creator>
      <dc:date>2020-11-03T15:26:25Z</dc:date>
    </item>
    <item>
      <title>Re: Can't write file "/root/.splunk/</title>
      <link>https://community.splunk.com/t5/Installation/Can-t-write-file-quot-root-splunk/m-p/527772#M6850</link>
      <description>&lt;P&gt;Thats correct. it worked for me when I used splunk command as splunk user without sudo.&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;</description>
      <pubDate>Tue, 03 Nov 2020 16:05:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Installation/Can-t-write-file-quot-root-splunk/m-p/527772#M6850</guid>
      <dc:creator>sramiz</dc:creator>
      <dc:date>2020-11-03T16:05:03Z</dc:date>
    </item>
  </channel>
</rss>

