<?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: Should Splunk honor umask when creating files? in Installation</title>
    <link>https://community.splunk.com/t5/Installation/Should-Splunk-honor-umask-when-creating-files/m-p/562314#M10499</link>
    <description>&lt;P&gt;Are you currently logged in as the ec2-user for that AMI? If so, the permission are bit different from the Splunk user. You can change users, stop Splunk, change permission of the directory, and re-launch Splunk.&lt;/P&gt;</description>
    <pubDate>Thu, 05 Aug 2021 21:04:48 GMT</pubDate>
    <dc:creator>splunker_alan</dc:creator>
    <dc:date>2021-08-05T21:04:48Z</dc:date>
    <item>
      <title>Should Splunk honor umask when creating files?</title>
      <link>https://community.splunk.com/t5/Installation/Should-Splunk-honor-umask-when-creating-files/m-p/535391#M7058</link>
      <description>&lt;P&gt;I stood up a clean install of Splunk in AWS using their &lt;A href="https://aws.amazon.com/marketplace/pp/B00PUXWXNE?qid=1610392083421&amp;amp;sr=0-1&amp;amp;ref_=srh_res_product_title" target="_blank" rel="noopener"&gt;latest published AMI&lt;/A&gt; (currently Splunk Enterprise 8.1.1 running on Amazon Linux 2). This install has a local user named &lt;FONT face="courier new,courier"&gt;splunk&lt;/FONT&gt; (with a group named &lt;FONT face="courier new,courier"&gt;splunk&lt;/FONT&gt;) under which the &lt;FONT face="courier new,courier"&gt;splunkd&lt;/FONT&gt; process is running.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;$ top -u splunk
  PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND
 4613 splunk    20   0  630312 166068  54880 S   0.7  1.0   0:49.25 splunkd
 4766 splunk    20   0  105488  13984   5168 S   0.3  0.1   0:01.60 splunkd
 4795 splunk    20   0 1642752  65616  28848 S   0.3  0.4   0:13.24 mongod
 4874 splunk    20   0 2669968  68704  15300 S   0.0  0.4   0:06.45 python3.7
 5154 splunk    20   0  197692  53536  42432 S   0.0  0.3   0:03.05 splunkd&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;With the instance running, without making any changes, it appears that all new files created by Splunk are getting &lt;FONT face="courier new,courier"&gt;600&lt;/FONT&gt; file permissions. For example, using the web interface under the default &lt;FONT face="courier new,courier"&gt;admin&lt;/FONT&gt; account and creating a new app-shared dashboard named &lt;FONT face="courier new,courier"&gt;test&lt;/FONT&gt; results in the following file/permissions:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;$ ls -al /opt/splunk/etc/apps/search/local/data/ui/views/
total 4
drwx------ 2 splunk splunk 22 Jan 11 18:53 .
drwx------ 3 splunk splunk 19 Jan 11 18:53 ..
-rw------- 1 splunk splunk 46 Jan 11 18:53 test.xml&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is not aligned with the &lt;FONT face="courier new,courier"&gt;umask&lt;/FONT&gt; value of the &lt;FONT face="courier new,courier"&gt;splunk&lt;/FONT&gt; user. e.g.,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;$ id
uid=1001(splunk) gid=1001(splunk) groups=1001(splunk)

$ umask
0002

$ cd /opt/splunk/etc/apps/search/local/data/ui/views/

$ touch test2.xml &amp;amp;&amp;amp; ls -al
total 4
drwx------ 2 splunk splunk 39 Jan 11 19:23 .
drwx------ 3 splunk splunk 19 Jan 11 18:53 ..
-rw-rw-r-- 1 splunk splunk  0 Jan 11 19:23 test2.xml
-rw------- 1 splunk splunk 46 Jan 11 18:53 test.xml&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is this behavior of creating files with owner-restricted permissions (not matching configured &lt;FONT face="courier new,courier"&gt;umask&lt;/FONT&gt;) expected? If yes (working as expected), is there somewhere in Splunk where these default file permissions can be configured?&lt;/P&gt;</description>
      <pubDate>Mon, 11 Jan 2021 19:38:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Installation/Should-Splunk-honor-umask-when-creating-files/m-p/535391#M7058</guid>
      <dc:creator>_splunkster</dc:creator>
      <dc:date>2021-01-11T19:38:33Z</dc:date>
    </item>
    <item>
      <title>Re: Should Splunk honor umask when creating files?</title>
      <link>https://community.splunk.com/t5/Installation/Should-Splunk-honor-umask-when-creating-files/m-p/562314#M10499</link>
      <description>&lt;P&gt;Are you currently logged in as the ec2-user for that AMI? If so, the permission are bit different from the Splunk user. You can change users, stop Splunk, change permission of the directory, and re-launch Splunk.&lt;/P&gt;</description>
      <pubDate>Thu, 05 Aug 2021 21:04:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Installation/Should-Splunk-honor-umask-when-creating-files/m-p/562314#M10499</guid>
      <dc:creator>splunker_alan</dc:creator>
      <dc:date>2021-08-05T21:04:48Z</dc:date>
    </item>
    <item>
      <title>Re: Should Splunk honor umask when creating files?</title>
      <link>https://community.splunk.com/t5/Installation/Should-Splunk-honor-umask-when-creating-files/m-p/562327#M10500</link>
      <description>&lt;P&gt;The &lt;FONT face="courier new,courier"&gt;ec2-user&lt;/FONT&gt; is used to access the Linux instance when it is running, but the &lt;FONT face="courier new,courier"&gt;ec2-user&lt;/FONT&gt; is not used in anyway for the question I'm posing.&lt;/P&gt;&lt;P&gt;My expectation is that the Splunk process(es) should honor the &lt;FONT face="courier new,courier"&gt;umask&lt;/FONT&gt; of the Linux user account under which they are running. Using this AMI, Splunk's processes are running under a Linux user account named &lt;FONT face="courier new,courier"&gt;splunk&lt;/FONT&gt; which has a &lt;FONT face="courier new,courier"&gt;umask&lt;/FONT&gt; of &lt;FONT face="courier new,courier"&gt;0002&lt;/FONT&gt;. When Splunk software creates new files, the file permissions are set to &lt;FONT face="courier new,courier"&gt;600&lt;/FONT&gt; which does not align with this &lt;FONT face="courier new,courier"&gt;umask&lt;/FONT&gt; -- it's as if these file permissions are being controlled through Splunk software, and not by OS configuration.&lt;/P&gt;&lt;P&gt;If you are asking if my &lt;FONT face="courier new,courier"&gt;touch test2.xml&lt;/FONT&gt; example was done under the &lt;FONT face="courier new,courier"&gt;ec2-user&lt;/FONT&gt; account, no it was done as the &lt;FONT face="courier new,courier"&gt;splunk&lt;/FONT&gt; user.&lt;/P&gt;</description>
      <pubDate>Thu, 05 Aug 2021 22:39:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Installation/Should-Splunk-honor-umask-when-creating-files/m-p/562327#M10500</guid>
      <dc:creator>_splunkster</dc:creator>
      <dc:date>2021-08-05T22:39:59Z</dc:date>
    </item>
    <item>
      <title>Re: Should Splunk honor umask when creating files?</title>
      <link>https://community.splunk.com/t5/Installation/Should-Splunk-honor-umask-when-creating-files/m-p/562951#M10521</link>
      <description>&lt;P&gt;The file permissions are set by Splunk Enterprise in order for Splunk to read and write certain files and do no match the umask of the OS. These settings are not adjustable out of the box with the AMI.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Aug 2021 15:06:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Installation/Should-Splunk-honor-umask-when-creating-files/m-p/562951#M10521</guid>
      <dc:creator>splunker_alan</dc:creator>
      <dc:date>2021-08-11T15:06:57Z</dc:date>
    </item>
  </channel>
</rss>

