Boost C++ Libraries: Ticket #7273: Files created by boost::iostreams::mapped_file have unexpected permissions on Linux https://svn.boost.org/trac10/ticket/7273 <p> The mapped_file class opens the file unconditionally via: </p> <div class="wiki-code"><div class="code"><pre><span class="o">::</span><span class="n">open</span><span class="p">(</span><span class="n">p</span><span class="p">.</span><span class="n">path</span><span class="p">.</span><span class="n">c_str</span><span class="p">(),</span> <span class="n">flags</span><span class="p">,</span> <span class="n">S_IRWXU</span><span class="p">);</span> </pre></div></div><p> Which sets the permissions to read, write, execute for the owner and no permissions for group or others. </p> <p> This is quite unexpected, and since it cannot be changed by the caller, I think a more sane default behavior would be to just use the default of open and let the user's umask decide the permission of newly created files. </p> <p> I.e. just remove the last parameter: </p> <div class="wiki-code"><div class="code"><pre><span class="o">::</span><span class="n">open</span><span class="p">(</span><span class="n">p</span><span class="p">.</span><span class="n">path</span><span class="p">.</span><span class="n">c_str</span><span class="p">(),</span> <span class="n">flags</span><span class="p">);</span> </pre></div></div> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/7273 Trac 1.4.3 patrick.reynolds@… Fri, 07 Mar 2014 20:33:10 GMT <link>https://svn.boost.org/trac10/ticket/7273#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/7273#comment:1</guid> <description> <p> Hi Folks, I'm seeing the same issue on Boost 1.55.0. </p> </description> <category>Ticket</category> </item> <item> <author>patrick.reynolds@…</author> <pubDate>Fri, 07 Mar 2014 20:42:48 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/7273#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/7273#comment:2</guid> <description> <p> It wouldn't let me post a link, but a put in a PR on github. </p> </description> <category>Ticket</category> </item> <item> <author>mika.heiskanen@…</author> <pubDate>Wed, 23 Aug 2017 05:12:35 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/7273#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/7273#comment:3</guid> <description> <p> The issue remains in version 1.65. </p> </description> <category>Ticket</category> </item> </channel> </rss>