core: prevent permissions error when VM was started by root
When VM is started by root, config file is created with root owner and user has no write access to it. As the directory is user-writable, delete the file first. Conflicts: core-modules/000QubesVm.py
This commit is contained in:
parent
52334bc414
commit
49d510dc65
@ -1090,6 +1090,8 @@ class QubesVm(object):
|
||||
# FIXME: This is only for debugging purposes
|
||||
old_umask = os.umask(002)
|
||||
try:
|
||||
if os.path.exists(file_path):
|
||||
os.unlink(file_path)
|
||||
conf_appvm = open(file_path, "w")
|
||||
conf_appvm.write(domain_config)
|
||||
conf_appvm.close()
|
||||
|
Loading…
Reference in New Issue
Block a user