Project

General

Profile

Actions

Bug #38743

closed

cephfs-shell: mkdir creates directory with invalid octal mode

Added by Milind Changire about 5 years ago. Updated almost 5 years ago.

Status:
Resolved
Priority:
Normal
Category:
-
Target version:
% 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:
Crash signature (v1):
Crash signature (v2):

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 1 (0 open1 closed)

Copied to CephFS - Backport #39376: nautilus: cephfs-shell: mkdir creates directory with invalid octal modeResolvedNathan CutlerActions
Actions

Also available in: Atom PDF