Merge pull request #190 from jwendell/vdiskmanager-chmod2

Recover file permissions after shrink a vmdk image
This commit is contained in:
Anders Ingemann 2015-01-28 08:32:00 +01:00
commit ae9e556bc0

View file

@ -81,4 +81,6 @@ class ShrinkVolume(Task):
@classmethod
def run(cls, info):
from bootstrapvz.common.tools import log_check_call
perm = os.stat(info.volume.image_path).st_mode & 0777
log_check_call(['/usr/bin/vmware-vdiskmanager', '-k', info.volume.image_path])
os.chmod(info.volume.image_path, perm)