Project

General

Profile

Bug #17858

Cannot create deep directories when caps contain "path=/somepath"

Added by Henrik Korkuc 8 months ago. Updated 6 days ago.

Status:
Resolved
Priority:
High
Category:
-
Target version:
Start date:
11/10/2016
Due date:
% Done:

0%

Source:
other
Tags:
Backport:
jewel
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Release:
jewel
Component(FS):
MDS
Needs Doc:
No

Description

ceph-fuse client with having "path=/something" cannot create multiple dirs with mkdir (e.g. mkdir -p 1/2/3/4/5/6/7/8/9/0/1/2/3/4/5/6/7/8/9)

ceph auth caps client.test mds "allow rw path=/test" mon "allow r" osd "allow rw pool=cephfs_data" 

it results in:

/mnt/test# mkdir -p 1/2/3/4/5/6/7/8/9/0/1/2/3/4/5/6/7/8/9
mkdir: cannot create directory ‘1/2/3/4’: Permission denied

only part of directory get's created. But using

ceph auth caps client.test mds "allow rw path=/" mon "allow r" osd "allow rw pool=cephfs_data" 

allows creation of such dir.

Client get's mounted using same cmd line both times.

First time I noticed this bug in 10.2.0, but it is still present in 10.2.3


Related issues

Duplicated by fs - Bug #17893: Intermittent permission denied using kernel client with mds path cap Duplicate 11/14/2016
Copied to fs - Backport #18008: jewel: Cannot create deep directories when caps contain "path=/somepath" Resolved

History

#1 Updated by John Spray 7 months ago

  • Assignee set to Patrick Donnelly
  • Priority changed from Normal to High
  • Target version set to v12.0.0

#2 Updated by John Spray 7 months ago

Same as http://tracker.ceph.com/issues/17893 ?

Henrik: are you on fuse or kernel client?

#3 Updated by Zheng Yan 7 months ago

The fix for #16358 is not complete. It only handles the case that inode is newly created, but does not handle the cases that inode's parent/ancestor directory are also newly created.

#4 Updated by Henrik Korkuc 7 months ago

I am not ceph-fuse

#5 Updated by Henrik Korkuc 7 months ago

sorry for misstype, I am ON ceph-fuse

#6 Updated by Dan van der Ster 7 months ago

Originally I could only reproduce with the kernel client. Now I can reproduce it also with ceph-fuse.

#7 Updated by Patrick Donnelly 7 months ago

  • Status changed from New to Need Review
  • Component(FS) MDS added

#8 Updated by Patrick Donnelly 7 months ago

  • Duplicated by Bug #17893: Intermittent permission denied using kernel client with mds path cap added

#9 Updated by Dan van der Ster 7 months ago

Thanks Patrick. I'm the user in #17893. If it's not too much trouble, could you push a wip-17893-jewel branch so we can let you know if this fixes the issue?

#10 Updated by Dan van der Ster 7 months ago

Err wip-17858-jewel ... you know what I meant ;)

#11 Updated by Patrick Donnelly 7 months ago

Sure, I just need to make some adjustments to the patch first. I'll comment here again when I've pushed the branch.

#13 Updated by Dan van der Ster 7 months ago

Thanks Patrick. Indeed wip-17858-jewel resolves this for us. Both mkdir -p and our original untar kernel reproducer in #17893 are working now without permission denied errors. Thanks! Obviously would greatly appreciate if you tagged this for a jewel backport.

#14 Updated by John Spray 7 months ago

  • Status changed from Need Review to Pending Backport
  • Backport set to jewel

#15 Updated by Loic Dachary 7 months ago

  • Copied to Backport #18008: jewel: Cannot create deep directories when caps contain "path=/somepath" added

#16 Updated by John Spray 5 months ago

  • Status changed from Pending Backport to Resolved

#17 Updated by Dan van der Ster 6 days ago

Just pinging this to say that there remain some issues with path-restricted caps, as shown in #20340.

Also available in: Atom PDF