allow rx permissions for group/world on .subvol dirs

vdisk_alloc comes in with an umask of 0037, which means the
.subvol dir has permissions 0740, which means that the root
directory of containers has permissions 0740, essentially
preventing the users inside a container from accessing
anything.
This commit is contained in:
Wolfgang Bumiller
2015-11-24 09:43:13 +01:00
committed by Dietmar Maurer
parent baa724b5d0
commit 1f5734bb8d

View File

@ -571,7 +571,11 @@ sub alloc_image {
# only allow this if size = 0, so that user knows what he is doing
die "storage does not support subvol quotas\n" if $size != 0;
(mkdir $path) || die "unable to create subvol '$path' - $!\n";
my $old_umask = umask(0022);
my $err;
mkdir($path) or $err = "unable to create subvol '$path' - $!\n";
umask $old_umask;
die $err if $err;
} else {
my $cmd = ['/usr/bin/qemu-img', 'create'];