Bug #17858
closedCannot create deep directories when caps contain "path=/somepath"
0%
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
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
Updated by John Spray over 7 years ago
Same as http://tracker.ceph.com/issues/17893 ?
Henrik: are you on fuse or kernel client?
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.
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.
Updated by Patrick Donnelly over 7 years ago
- Status changed from New to Fix Under Review
- Component(FS) MDS added
Updated by Patrick Donnelly over 7 years ago
- Has duplicate Bug #17893: Intermittent permission denied using kernel client with mds path cap added
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?
Updated by Dan van der Ster over 7 years ago
Err wip-17858-jewel ... you know what I meant ;)
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.
Updated by Patrick Donnelly over 7 years ago
Dan, give this a try: https://github.com/ceph/ceph/tree/wip-17858-jewel
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.
Updated by John Spray over 7 years ago
- Status changed from Fix Under Review to Pending Backport
- Backport set to jewel
Updated by Loïc Dachary over 7 years ago
- Copied to Backport #18008: jewel: Cannot create deep directories when caps contain "path=/somepath" added
Updated by John Spray over 7 years ago
- Status changed from Pending Backport to Resolved
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.