<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 03:14:58 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>MongoDB Jira</title>
    <link>https://jira.mongodb.org</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>9.7.1</version>
        <build-number>970001</build-number>
        <build-date>13-04-2023</build-date>
    </build-info>


<item>
            <title>[SERVER-7583] Different users in same unix group can&apos;t run mongod against single db owned by that group</title>
                <link>https://jira.mongodb.org/browse/SERVER-7583</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;I&apos;d like to let different users (call them jack &amp;amp; jane) launch mongod using the same dbpath (call it /datadir).  Here&apos;s what I try:&lt;br/&gt;
1) chown all the files in /datadir to jack:mongogroup&lt;br/&gt;
2) chmod -R g+rw /datadir&lt;br/&gt;
3) useradd jack and jane to mongogroup.&lt;/p&gt;

&lt;p&gt;When I launch mongod --dbpath=/datadir as jack, things are fine.  But when I try to relaunch mongod as jane, I get errors like this:&lt;br/&gt;
Wed Nov  7 00:30:43 &lt;span class=&quot;error&quot;&gt;&amp;#91;initandlisten&amp;#93;&lt;/span&gt; warning couldn&apos;t write to / rename file /datadir/journal/prealloc.0: couldn&apos;t open file /datadir/journal/prealloc.0 for writing errno:1 Operation not permitted&lt;br/&gt;
Wed Nov  7 00:30:43 &lt;span class=&quot;error&quot;&gt;&amp;#91;initandlisten&amp;#93;&lt;/span&gt; couldn&apos;t open /datadir/sample.ns errno:1 Operation not permitted&lt;/p&gt;

&lt;p&gt;This doesn&apos;t seem to be (simply) a permissions issue.  If I make a mistake on permissions, I get &quot;errno:13 Permission denied&quot;, instead of &quot;errno:1 Operation not permitted&quot;.  Also, jane can read/write test files in that directory as expected (aside from launching mongod).&lt;/p&gt;</description>
                <environment></environment>
        <key id="55551">SERVER-7583</key>
            <summary>Different users in same unix group can&apos;t run mongod against single db owned by that group</summary>
                <type id="1" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14703&amp;avatarType=issuetype">Bug</type>
                                            <priority id="2" iconUrl="https://jira.mongodb.org/images/icons/priorities/critical.svg">Critical - P2</priority>
                        <status id="6" iconUrl="https://jira.mongodb.org/images/icons/statuses/closed.png" description="The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.">Closed</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="9">Done</resolution>
                                        <assignee username="akshay@mongodb.com">Akshay Kumar</assignee>
                                    <reporter username="bobbyj">Bobby J</reporter>
                        <labels>
                    </labels>
                <created>Wed, 7 Nov 2012 19:38:09 +0000</created>
                <updated>Fri, 7 Apr 2023 13:36:47 +0000</updated>
                            <resolved>Sat, 10 Nov 2012 21:01:24 +0000</resolved>
                                                                                        <votes>0</votes>
                                    <watches>9</watches>
                                                                                                                <comments>
                            <comment id="185940" author="akshay" created="Mon, 12 Nov 2012 00:38:57 +0000"  >&lt;p&gt;Robert,&lt;/p&gt;

&lt;p&gt;The simplest effective way to do this is to use sudo.&lt;/p&gt;

&lt;p&gt;Best,&lt;br/&gt;
Akshay&lt;/p&gt;
</comment>
                            <comment id="185903" author="bobbyj" created="Sun, 11 Nov 2012 23:33:30 +0000"  >&lt;p&gt;Akshay, that does the trick, thanks!&lt;/p&gt;

&lt;p&gt;But now, as Jason predicted, jane has to chmod g+rw before jack can use again &amp;#8211; which is a problem for us.  (Can I tell mongod to open new files with mode 660?)&lt;/p&gt;


&lt;p&gt;So stepping back:  what is the recommended way to enable multiple (non-root) users to launch mongod in a shared environment?&lt;/p&gt;</comment>
                            <comment id="184833" author="akshay" created="Sat, 10 Nov 2012 01:53:01 +0000"  >&lt;p&gt;Hi Robert,&lt;/p&gt;

&lt;p&gt;You are absolutely correct, it won&apos;t work. Here is why:&lt;/p&gt;

&lt;p&gt;mongod opens database files using the O_NOATIME flag to the open system call so that we don&apos;t update the access time on each read. open with O_NOATIME only works if the effective UID (FSUID on Linux) is 0, matches the owner of the file or the caller is privileged (CAP_FOWNER). O_NOATIME behaves this way for security reasons. Hence the failure.&lt;/p&gt;

&lt;p&gt;There are other better ways to do what you are trying to accomplish but if you really want to go this route here is how you do it. Use POSIX Capabilities in Linux.&lt;/p&gt;

&lt;p&gt;#setcap cap_fowner+ep /usr/bin/mongod&lt;/p&gt;

&lt;p&gt;Best,&lt;br/&gt;
Akshay&lt;/p&gt;</comment>
                            <comment id="184788" author="rassi@10gen.com" created="Fri, 9 Nov 2012 22:26:54 +0000"  >&lt;p&gt;Can you paste the full output of &quot;ls -alR /datadir&quot;?&lt;/p&gt;

&lt;p&gt;As a sidenote: before starting MongoDB again as a different user, you need to chmod g+rw all files in the data directory, even if you setgid the directory.  Any new files MongoDB opens are created with mode 600; these will be owned by the &quot;wrong&quot; user when you start it again.&lt;/p&gt;</comment>
                            <comment id="183972" author="bobbyj" created="Thu, 8 Nov 2012 09:10:52 +0000"  >&lt;p&gt;Pretty sure... jane can read/write test files with the same permissions in the directory, she just can&apos;t launch mongod.  What could I be missing?  Here are the permissions in ./journal&lt;/p&gt;

&lt;p&gt;drwxrwsr-x 2 jack mongogroup 4.0K Nov  8 01:01 .&lt;br/&gt;
drwxrwsr-x 3 jack mongogroup 4.0K Nov  8 01:00 ..&lt;br/&gt;
&lt;del&gt;rw-rw&lt;/del&gt;--- 1 jack mongogroup 1.0G Nov  8 00:52 prealloc.0&lt;br/&gt;
&lt;del&gt;rw-rw&lt;/del&gt;--- 1 jack mongogroup 1.0G Nov  8 00:52 prealloc.1&lt;br/&gt;
&lt;del&gt;rw-rw&lt;/del&gt;--- 1 jack mongogroup 1.0G Nov  6 16:22 prealloc.2&lt;/p&gt;

&lt;p&gt;&amp;gt; grep mongogroup /etc/group&lt;br/&gt;
mongogroup:x:1006:jack,jane,mongodb&lt;/p&gt;

&lt;p&gt;But error remains same as above.&lt;/p&gt;</comment>
                            <comment id="183917" author="eliot" created="Thu, 8 Nov 2012 05:16:52 +0000"  >&lt;p&gt;Are you sure jane has access to journal?&lt;br/&gt;
This is almost definitely a permissions issue as we don&apos;t do anything with users, its just standard posix calls.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10010">
                    <name>Duplicate</name>
                                            <outwardlinks description="duplicates">
                                                        </outwardlinks>
                                                        </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>6.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Thu, 8 Nov 2012 05:16:52 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        11 years, 14 weeks, 3 days ago
    
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18254" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Dependencies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[]]></customfieldvalue>


                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_15850" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_10057" key="com.atlassian.jira.toolkit:lastusercommented">
                        <customfieldname>Last comment by Customer</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>true</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10056" key="com.atlassian.jira.toolkit:lastupdaterorcommenter">
                        <customfieldname>Last commenter</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>luke.bonanomi@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            11 years, 14 weeks, 3 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_10000" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Old_Backport</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10000"><![CDATA[No]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10032" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                        <customfieldname>Operating System</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10026"><![CDATA[ALL]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>akshay@mongodb.com</customfieldvalue>
            <customfieldvalue>bobbyj</customfieldvalue>
            <customfieldvalue>eliot</customfieldvalue>
            <customfieldvalue>rassi</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrnij3:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hrkfdr:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>32926</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_23361" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Requested By</customfieldname>
                        <customfieldvalues>
                                

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10053" key="com.atlassian.jira.ext.charting:timeinstatus">
                        <customfieldname>Time In Status</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_22870" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Triagers</customfieldname>
                        <customfieldvalues>
                                

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_14350" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>serverRank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|ht069b:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                    </customfields>
    </item>
</channel>
</rss>