Project

General

Profile

Bug #38743

Updated by Patrick Donnelly almost 2 years ago

<pre>
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/
</pre>


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().
validation

Back