Ensure instances path is accessible by varying users, ie qemu needs this
This commit is contained in:
parent
48ee64f4ff
commit
09159336f4
@ -763,6 +763,9 @@ class NovaConfConfigurator(object):
|
||||
self.tracewriter.dirs_made(*sh.mkdirslist(instances_path))
|
||||
LOG.debug("Adjusting permissions of instance directory: %s" % (instances_path))
|
||||
sh.chmod(instances_path, 0777)
|
||||
with sh.Rooted(True):
|
||||
# This seems required... (maybe only on RHEL?)
|
||||
sh.rchmod(sh.dirname(instances_path), 0665)
|
||||
|
||||
def _configure_libvirt(self, virt_type, nova_conf):
|
||||
if virt_type == 'lxc':
|
||||
|
@ -285,6 +285,12 @@ def _explode_form_path(path):
|
||||
return ret_paths
|
||||
|
||||
|
||||
def rchmod(path, perm):
|
||||
paths = _explode_form_path(path)
|
||||
for p in paths:
|
||||
chmod(p, perm)
|
||||
|
||||
|
||||
def in_terminal(check_both=False):
|
||||
if check_both:
|
||||
return sys.stdout.isatty() and sys.stderr.isatty()
|
||||
|
Loading…
Reference in New Issue
Block a user