Project

General

Profile

Actions

Bug #17858

closed

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

Added by Henrik Korkuc over 7 years ago. Updated almost 7 years ago.

Status:
Resolved
Priority:
High
Category:
-
Target version:
% Done:

0%

Source:
other
Tags:
Backport:
jewel
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Component(FS):
MDS
Labels (FS):
Pull request ID:
Crash signature (v1):
Crash signature (v2):

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 2 (0 open2 closed)

Has duplicate CephFS - Bug #17893: Intermittent permission denied using kernel client with mds path capDuplicatePatrick Donnelly11/14/2016

Actions
Copied to CephFS - Backport #18008: jewel: Cannot create deep directories when caps contain "path=/somepath"ResolvedLoïc DacharyActions
Actions #1

Updated by John Spray over 7 years ago

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

Updated by John Spray over 7 years ago

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

Henrik: are you on fuse or kernel client?

Actions #3

Updated by Zheng Yan over 7 years 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.

Actions #4

Updated by Henrik Korkuc over 7 years ago

I am not ceph-fuse

Actions #5

Updated by Henrik Korkuc over 7 years ago

sorry for misstype, I am ON ceph-fuse

Actions #6

Updated by Dan van der Ster over 7 years ago

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

Actions #7

Updated by Patrick Donnelly over 7 years ago

  • Status changed from New to Fix Under Review
  • Component(FS) MDS added
Actions #8

Updated by Patrick Donnelly over 7 years ago

  • Has duplicate Bug #17893: Intermittent permission denied using kernel client with mds path cap added
Actions #9

Updated by Dan van der Ster over 7 years 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?

Actions #10

Updated by Dan van der Ster over 7 years ago

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

Actions #11

Updated by Patrick Donnelly over 7 years ago

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

Actions #13

Updated by Dan van der Ster over 7 years 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.

Actions #14

Updated by John Spray over 7 years ago

  • Status changed from Fix Under Review to Pending Backport
  • Backport set to jewel
Actions #15

Updated by Loïc Dachary over 7 years ago

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

Updated by John Spray over 7 years ago

  • Status changed from Pending Backport to Resolved
Actions #17

Updated by Dan van der Ster almost 7 years ago

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

Actions

Also available in: Atom PDF