https://tracker.ceph.com/https://tracker.ceph.com/favicon.ico2017-06-19T13:30:41ZCeph CephFS - Bug #20340: cephfs permission denied until second client accesses filehttps://tracker.ceph.com/issues/20340?journal_id=931962017-06-19T13:30:41ZDan van der Ster
<ul></ul><p>I should mention that while client A was a user that has a path-restricted mds cap, the client B that "fixes" the EPERM is client.admin with unrestricted mds caps. I didn't try using his restricted cap to stat from a second machine.</p> CephFS - Bug #20340: cephfs permission denied until second client accesses filehttps://tracker.ceph.com/issues/20340?journal_id=933992017-06-20T09:18:20ZDan van der Ster
<ul></ul><p>I've confirmed that none of these help resolve these EPERM files:</p>
<ul>
<li>restart the ceph-fuse on client A</li>
<li>mount with fuse_disable_pagecache = 1</li>
<li>mount with fuse_default_permissions = 0</li>
</ul> CephFS - Bug #20340: cephfs permission denied until second client accesses filehttps://tracker.ceph.com/issues/20340?journal_id=934002017-06-20T09:28:59ZDan van der Ster
<ul></ul><p>Ahh so it <strong>is</strong> related to path-restricted cap.<br />I tried as above with client B having the same client caps -- didn't fix the EPERM.</p>
<p>But when I remove the path-restricted cap, <strong>then remount</strong>, then the EPERM files can be stat'd.</p>
<p>Could it be that the fix for <a class="issue tracker-1 status-3 priority-5 priority-high3 closed" title="Bug: Cannot create deep directories when caps contain "path=/somepath" (Resolved)" href="https://tracker.ceph.com/issues/17858">#17858</a> is incomplete?</p> CephFS - Bug #20340: cephfs permission denied until second client accesses filehttps://tracker.ceph.com/issues/20340?journal_id=934022017-06-20T09:49:26ZDan van der Ster
<ul></ul><p>Yup, in this case the diri is_stray (it looks like this<br /><pre>
check_access stray_prior_path #10000ee3d6f/tmp_obj_x3Ncq5*
</pre><br /> So it doesn't match the path prefix and cehck_access returns EPERM.</p>
<p>Relevant check is here, but I'm not sure how to turn #10000ee3d6f/tmp_obj_x3Ncq5 into the actual path.</p>
<pre>
int Session::check_access(CInode *in, unsigned mask,
int caller_uid, int caller_gid,
int new_uid, int new_gid)
{
string path;
CInode *diri = NULL;
if (!in->is_base())
diri = in->get_projected_parent_dn()->get_dir()->get_inode();
if (diri && diri->is_stray()){
path = in->get_projected_inode()->stray_prior_path;
dout(20) << __func__ << " stray_prior_path " << path << dendl;
} else {
in->make_path_string(path, true);
dout(20) << __func__ << " path " << path << dendl;
}
</pre>
<p><strong>path = in->get_projected_inode()->stray_prior_path;</strong> seems incorrect?</p> CephFS - Bug #20340: cephfs permission denied until second client accesses filehttps://tracker.ceph.com/issues/20340?journal_id=934162017-06-20T13:52:01ZJohn Sprayjcspray@gmail.com
<ul><li><strong>Assignee</strong> changed from <i>John Spray</i> to <i>Zheng Yan</i></li></ul> CephFS - Bug #20340: cephfs permission denied until second client accesses filehttps://tracker.ceph.com/issues/20340?journal_id=934172017-06-20T13:52:12ZJohn Sprayjcspray@gmail.com
<ul><li><strong>Backport</strong> set to <i>jewel, kraken</i></li></ul> CephFS - Bug #20340: cephfs permission denied until second client accesses filehttps://tracker.ceph.com/issues/20340?journal_id=935012017-06-21T07:57:15ZZheng Yanukernel@gmail.com
<ul><li><strong>Status</strong> changed from <i>New</i> to <i>Fix Under Review</i></li></ul><p><a class="external" href="https://github.com/ceph/ceph/pull/15800">https://github.com/ceph/ceph/pull/15800</a></p> CephFS - Bug #20340: cephfs permission denied until second client accesses filehttps://tracker.ceph.com/issues/20340?journal_id=935142017-06-21T10:22:18ZDan van der Ster
<ul></ul><p>Thanks for this patch. It seems to fix the problem for our users.</p> CephFS - Bug #20340: cephfs permission denied until second client accesses filehttps://tracker.ceph.com/issues/20340?journal_id=936022017-06-22T11:08:08ZJohn Sprayjcspray@gmail.com
<ul><li><strong>Status</strong> changed from <i>Fix Under Review</i> to <i>Pending Backport</i></li></ul> CephFS - Bug #20340: cephfs permission denied until second client accesses filehttps://tracker.ceph.com/issues/20340?journal_id=937022017-06-23T20:14:39ZNathan Cutlerncutler@suse.cz
<ul><li><strong>Copied to</strong> <i><a class="issue tracker-9 status-3 priority-4 priority-default closed" href="/issues/20403">Backport #20403</a>: jewel: cephfs permission denied until second client accesses file</i> added</li></ul> CephFS - Bug #20340: cephfs permission denied until second client accesses filehttps://tracker.ceph.com/issues/20340?journal_id=937042017-06-23T20:14:41ZNathan Cutlerncutler@suse.cz
<ul><li><strong>Copied to</strong> <i><a class="issue tracker-9 status-6 priority-4 priority-default closed" href="/issues/20404">Backport #20404</a>: kraken: cephfs permission denied until second client accesses file</i> added</li></ul> CephFS - Bug #20340: cephfs permission denied until second client accesses filehttps://tracker.ceph.com/issues/20340?journal_id=981912017-09-04T19:10:37ZNathan Cutlerncutler@suse.cz
<ul><li><strong>Status</strong> changed from <i>Pending Backport</i> to <i>Resolved</i></li></ul>