Bug #51870
closedpybind/mgr/volumes: first subvolume permissions set perms on /volumes and /volumes/group
100%
Description
Because we use the "mkdirs" method for making parents to a subvolume, the perms for the subvolume specified by --mode are used for all parents too. This is wrong because you can get:
pdonnell@vossi04 ~/ceph/build$ bin/ceph fs subvolume create a d --mode=777 --size=$((2**30)) pdonnell@vossi04 ~/mnt/tmp.0cSPBAJM59$ ls -lha volumes/ total 1.5K drwxrwxrwx. 3 root root 120 Jul 27 19:17 . drwxr-xr-x. 4 pdonnell pdonnell 473M Jul 27 19:17 .. -rwxr-xr-x. 1 root root 0 Jul 27 19:17 _:d.meta drwxrwxrwx. 3 root root 120 Jul 27 19:17 _nogroup
volumes should be 0755 and _nogroup should be 0755.
Updated by Ramana Raja almost 3 years ago
Nice catch! The current test, test_subvolume_create_with_desired_mode_in_group doesn't check whether the mode of subvolume group remains unchanged. How did you run into this bug?
We'll need this in Octopus too? Upstream manila CI uses octopus for testing.
Updated by Patrick Donnelly almost 3 years ago
- Backport changed from pacific to pacific,octopus
Ramana Raja wrote:
Nice catch! The current test, test_subvolume_create_with_desired_mode_in_group doesn't check whether the mode of subvolume group remains unchanged. How did you run into this bug?
Manual testing for an unrelated BZ.
We'll need this in Octopus too? Upstream manila CI uses octopus for testing.
Sure.
Updated by Kotresh Hiremath Ravishankar almost 3 years ago
- Pull request ID set to 42719
Updated by Kotresh Hiremath Ravishankar almost 3 years ago
- Status changed from New to Fix Under Review
Updated by Patrick Donnelly over 2 years ago
- Status changed from Fix Under Review to Pending Backport
Updated by Backport Bot over 2 years ago
- Copied to Backport #52628: pacific: pybind/mgr/volumes: first subvolume permissions set perms on /volumes and /volumes/group added
Updated by Backport Bot over 2 years ago
- Copied to Backport #52629: octopus: pybind/mgr/volumes: first subvolume permissions set perms on /volumes and /volumes/group added
Updated by Konstantin Shalygin about 1 year ago
- Status changed from Pending Backport to Resolved
- % Done changed from 0 to 100