Project

General

Profile

Bug #38743

cephfs-shell: mkdir creates directory with invalid octal mode

Added by Milind Changire 5 months ago. Updated 2 months ago.

Status:
Resolved
Priority:
Normal
Category:
-
Target version:
Start date:
Due date:
% Done:

0%

Source:
Development
Tags:
Backport:
nautilus
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Component(FS):
Client, cephfs-shell
Labels (FS):
task(easy), task(intern)
Pull request ID:

Description

CephFS:~/>>> mkdir -m 07000 d3
CephFS:~/>>> ls -l
drwxrwxrwx            0 25405 25405 2019-03-14 12:12:29 d1/
drwx------            0 25405 25405 2019-03-14 18:04:46 d2/
d---------            0 25405 25405 2019-03-14 18:18:31 d3/

CephFS:~/>>> mkdir -m 070000 d4
CephFS:~/>>> ls -l
drwxrwxrwx            0 25405 25405 2019-03-14 12:12:29 d1/
drwx------            0 25405 25405 2019-03-14 18:04:46 d2/
d---------            0 25405 25405 2019-03-14 18:18:31 d3/
d---------            0 25405 25405 2019-03-14 18:18:48 d4/

CephFS:~/>>> mkdir -m 0700001 d5
CephFS:~/>>> ls -l
drwxrwxrwx            0 25405 25405 2019-03-14 12:12:29 d1/
drwx------            0 25405 25405 2019-03-14 18:04:46 d2/
d---------            0 25405 25405 2019-03-14 18:18:31 d3/
d---------            0 25405 25405 2019-03-14 18:18:48 d4/
d--------x            0 25405 25405 2019-03-14 18:21:50 d5/

CephFS:~/>>> mkdir -m -0700001 d6
CephFS:~/>>> ls -l
drwxrwxrwx            0 25405 25405 2019-03-14 12:12:29 d1/
drwx------            0 25405 25405 2019-03-14 18:04:46 d2/
d---------            0 25405 25405 2019-03-14 18:18:31 d3/
d---------            0 25405 25405 2019-03-14 18:18:48 d4/
d--------x            0 25405 25405 2019-03-14 18:21:50 d5/
drwxrwxrwx            0 25405 25405 2019-03-14 18:24:07 d6/

Octal mode requires rigorous parsing and validation.

This is also a bug with the Ceph client user-space library. We should validate the mode given for Client::create().


Related issues

Copied to fs - Backport #39376: nautilus: cephfs-shell: mkdir creates directory with invalid octal mode Resolved

History

#1 Updated by Patrick Donnelly 5 months ago

  • Description updated (diff)
  • Assignee set to Milind Changire
  • Target version set to v15.0.0
  • Start date deleted (03/14/2019)
  • Source set to Development
  • Backport set to nautilus
  • Component(FS) Client added
  • Labels (FS) task(easy), task(intern) added

#2 Updated by Milind Changire 5 months ago

  • Status changed from New to Need Review
  • Pull request ID set to 27235

#3 Updated by Patrick Donnelly 4 months ago

  • Status changed from Need Review to Pending Backport

#4 Updated by Nathan Cutler 4 months ago

  • Copied to Backport #39376: nautilus: cephfs-shell: mkdir creates directory with invalid octal mode added

#5 Updated by Nathan Cutler 2 months ago

  • Status changed from Pending Backport to Resolved

Also available in: Atom PDF