diff --git a/qubes/storage/__init__.py b/qubes/storage/__init__.py index dcdc32ff..0af1ad27 100644 --- a/qubes/storage/__init__.py +++ b/qubes/storage/__init__.py @@ -310,7 +310,7 @@ class Storage(object): def create(self): ''' Creates volumes on disk ''' - old_umask = os.umask(002) + old_umask = os.umask(0o002) for volume in self.vm.volumes.values(): self.get_pool(volume).create(volume) diff --git a/qubes/storage/file.py b/qubes/storage/file.py index 3f899f90..62b813c9 100644 --- a/qubes/storage/file.py +++ b/qubes/storage/file.py @@ -186,7 +186,7 @@ class FilePool(qubes.storage.Pool): old_path = volume.path_cow + '.old' os.rename(volume.path_cow, old_path) - old_umask = os.umask(002) + old_umask = os.umask(0o002) with open(volume.path_cow, 'w') as f_cow: f_cow.truncate(volume.size) os.umask(old_umask) diff --git a/qubes/vm/__init__.py b/qubes/vm/__init__.py index 7ccf4c9f..673eef2f 100644 --- a/qubes/vm/__init__.py +++ b/qubes/vm/__init__.py @@ -325,7 +325,7 @@ class BaseVM(qubes.PropertyHolder): tree = lxml.etree.ElementTree(root) try: - old_umask = os.umask(002) + old_umask = os.umask(0o002) with open(os.path.join(self.dir_path, self.firewall_conf), 'w') as fd: tree.write(fd, encoding="UTF-8", pretty_print=True)