<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 02:27:52 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>Whamcloud Community JIRA</title>
    <link>https://jira.whamcloud.com</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>9.4.14</version>
        <build-number>940014</build-number>
        <build-date>05-12-2023</build-date>
    </build-info>


<item>
            <title>[LU-9629] lfs migrate does not work as a non-root user</title>
                <link>https://jira.whamcloud.com/browse/LU-9629</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;Patch &lt;a href=&quot;https://review.whamcloud.com/25851&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/25851&lt;/a&gt; &quot;&lt;a href=&quot;https://jira.whamcloud.com/browse/LU-6051&quot; title=&quot;&amp;quot;lfs_migrate&amp;quot; improvements&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-6051&quot;&gt;&lt;del&gt;LU-6051&lt;/del&gt;&lt;/a&gt; utils: allow lfs_migrate to handle hard links&quot; adds the ability to migrate hard-linked files using &quot;&lt;tt&gt;lfs fid2path&lt;/tt&gt;&quot; to determine the names of links to a file, but this command only works as the root user.&lt;/p&gt;
&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;$ lfs fid2path myth [0x200016b84:0x10a9b:0x0]
ioctl err -1: Operation not permitted (1)
fid2path: error on FID [0x200016b84:0x10a9b:0x0]: Operation not permitted
$ strace lfs fid2path myth [0x200016b84:0x10a9b:0x0]
open(&quot;/etc/mtab&quot;, O_RDONLY)             = 3
read(3, &quot;/dev/mapper/vg_twoshoes-lvroot /&quot;..., 4096) = 466
close(3)                                = 0
open(&quot;/myth&quot;, O_RDONLY|O_NONBLOCK|O_DIRECTORY) = 3
ioctl(3, 0xffffffffc0086696, 0x1b19040) = -1 EPERM (Operation not permitted)
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;So the open of the root directory succeeded, but the ioctl failed.  It would be useful if a regular user could run this same command on files that they own.&lt;/p&gt;

&lt;p&gt;Also, the &quot;lfs fid2path&quot; command requires specifying the mountpoint of the filesystem (e.g. &lt;tt&gt;/mnt/testfs&lt;/tt&gt;), but if e.g. &quot;$PWD&quot; is given as the mountpoint then it prepends the whole specified path to the start of the returned pathname rather than the actual mountpoint:&lt;/p&gt;
&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;# df .
Filesystem         1K-blocks        Used  Available Use% Mounted on
mookie-gig:/myth 23322497088 16086795940 6593847700  71% /myth
# lfs fid2path . [0x200016b84:0x10a9b:0x0]
ioctl err -19: No such device (19)
fid2path: error on FID [0x200016b84:0x10a9b:0x0]: No such device
# pwd
/myth/tmp/links
# lfs fid2path $PWD [0x200016b84:0x10a9b:0x0]
/myth/tmp/links/tmp/links/hosts
/myth/tmp/links/tmp/links/link1
/myth/tmp/links/tmp/links/link2
:
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;It would be useful if specifying &quot;.&quot; or any other pathname looked up the mountpoint of that directory based on the current working directory and showed the correct pathnames for the links.  It is already looking up the mountpoint in /etc/mtab to open the root directory for the ioctl(), so this shouldn&apos;t be too much additional work.&lt;/p&gt;</description>
                <environment></environment>
        <key id="46611">LU-9629</key>
            <summary>lfs migrate does not work as a non-root user</summary>
                <type id="4" iconUrl="https://jira.whamcloud.com/secure/viewavatar?size=xsmall&amp;avatarId=11310&amp;avatarType=issuetype">Improvement</type>
                                            <priority id="4" iconUrl="https://jira.whamcloud.com/images/icons/priorities/minor.svg">Minor</priority>
                        <status id="5" iconUrl="https://jira.whamcloud.com/images/icons/statuses/resolved.png" description="A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.">Resolved</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="1">Fixed</resolution>
                                        <assignee username="simmonsja">James A Simmons</assignee>
                                    <reporter username="adilger">Andreas Dilger</reporter>
                        <labels>
                            <label>LTS12</label>
                            <label>medium</label>
                    </labels>
                <created>Fri, 9 Jun 2017 19:34:07 +0000</created>
                <updated>Mon, 9 Dec 2019 08:12:56 +0000</updated>
                            <resolved>Wed, 23 Oct 2019 03:32:05 +0000</resolved>
                                                    <fixVersion>Lustre 2.13.0</fixVersion>
                                        <due></due>
                            <votes>0</votes>
                                    <watches>5</watches>
                                                                            <comments>
                            <comment id="216530" author="adilger" created="Sun, 17 Dec 2017 08:57:07 +0000"  >&lt;p&gt;I believe that &lt;tt&gt;fid2path&lt;/tt&gt; can already work in a subdirectory, it may just need some fixing in &lt;tt&gt;lctl&lt;/tt&gt; to handle the partial path rather than always traversing to the ROOT directory.&lt;/p&gt;

&lt;p&gt;The &lt;tt&gt;fid2path&lt;/tt&gt; command could be run in the context of the user, and permission checked on every parent whether the command can continue.  If the &lt;tt&gt;fid2path&lt;/tt&gt; hits the designated root directory without error then the command is successful and the path can be returned, otherwise it should return &lt;tt&gt;-EACCESS&lt;/tt&gt; if it doesn&apos;t have permission on some directory in the path and not return anything to userspace.&lt;/p&gt;</comment>
                            <comment id="255961" author="gerrit" created="Sat, 5 Oct 2019 06:20:28 +0000"  >&lt;p&gt;Andreas Dilger (adilger@whamcloud.com) uploaded a new patch: &lt;a href=&quot;https://review.whamcloud.com/36383&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/36383&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-9629&quot; title=&quot;lfs migrate does not work as a non-root user&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-9629&quot;&gt;&lt;del&gt;LU-9629&lt;/del&gt;&lt;/a&gt; utils: fix lfs_migrate for non-root users&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: eeaf59b2c102f071a90e925b0d69bdba7fa2f0a5&lt;/p&gt;</comment>
                            <comment id="255962" author="adilger" created="Sat, 5 Oct 2019 06:31:08 +0000"  >&lt;p&gt;The above patch mostly addresses the issue with &quot;&lt;tt&gt;lfs_migrate&lt;/tt&gt;&quot; depending on &quot;&lt;tt&gt;lfs fid2path&lt;/tt&gt;&quot; in order to migrate hard-linked files.&#160; In fact, this is only needed if &quot;&lt;tt&gt;lfs migrate&lt;/tt&gt;&quot; is not working and the fallback &quot;&lt;tt&gt;rsync&lt;/tt&gt;&quot; code is used.&#160; That shouldn&apos;t happen with any modern Lustre versions, so there is no requirement for &quot;&lt;tt&gt;lfs fid2path&lt;/tt&gt;&quot; to work for most uses.&lt;/p&gt;

&lt;p&gt;It would still be useful to fix the &lt;tt&gt;fid2path&lt;/tt&gt; implementation to work for non-root users as long as the full pathname is accessible to the user, as described above, but that is for a separate patch.&lt;/p&gt;</comment>
                            <comment id="256884" author="gerrit" created="Tue, 22 Oct 2019 23:57:21 +0000"  >&lt;p&gt;Oleg Drokin (green@whamcloud.com) merged in patch &lt;a href=&quot;https://review.whamcloud.com/36383/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/36383/&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-9629&quot; title=&quot;lfs migrate does not work as a non-root user&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-9629&quot;&gt;&lt;del&gt;LU-9629&lt;/del&gt;&lt;/a&gt; utils: fix lfs_migrate for non-root users&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: &lt;br/&gt;
Commit: dd009a221d14feb463ef1179559e5bbab22efa08&lt;/p&gt;</comment>
                            <comment id="256903" author="pjones" created="Wed, 23 Oct 2019 03:32:05 +0000"  >&lt;p&gt;Landed for 2.13&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Related</name>
                                            <outwardlinks description="is related to ">
                                        <issuelink>
            <issuekey id="53572">LU-11501</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="53584">LU-11510</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="54079">LU-11687</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="27979">LU-6051</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="46202">LU-9537</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                            <customfield id="customfield_10890" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_10390" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hzzeof:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10090" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>9223372036854775807</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                </customfields>
    </item>
</channel>
</rss>