Boost C++ Libraries: Ticket #4979: shared_memory_object open_only ctor resets permissions to default https://svn.boost.org/trac10/ticket/4979 <p> Because of a call to ::fchmod() in shared_memory_object::priv_open_or_create, if you use attempt to open a shm segment using the open_only tag, you will always reset the existing perms to the default. These 3 lines are the problem: </p> <pre class="wiki"> if(m_handle &gt;= 0){ ::fchmod(m_handle, perm.get_permissions()); } </pre><p> If you delete these lines (on Linux, anyway) things looks right. I don't know why those lines are there, but if they are needed for portability, perhaps something like </p> <pre class="wiki"> if(m_handle &gt;= 0 &amp;&amp; type != detail::DoOpen){ ::fchmod(m_handle, perm.get_permissions()); } </pre><p> might work better. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/4979 Trac 1.4.3 Ion Gaztañaga Sun, 26 Dec 2010 10:14:12 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/4979#comment:1 https://svn.boost.org/trac10/ticket/4979#comment:1 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> Updated SVN code. Permissions updated only when the shm is created. Thanks for the report. </p> Ticket