change order of chmod on create fifo

need to chmod *after* the chown so it works when the kolla
group is not the primary group of the user.

Jira-Issue: None
This commit is contained in:
Steve Noyes 2016-05-09 18:23:18 -04:00
parent 81397afd92
commit 977af684ba
1 changed files with 2 additions and 1 deletions

View File

@ -79,9 +79,10 @@ class AnsibleJob(object):
.format(cmd=self._command))
# create and open named pipe, must be owned by kolla group
os.mkfifo(self._fifo_path, 0o660)
os.mkfifo(self._fifo_path)
_, grp_id = get_admin_uids()
os.chown(self._fifo_path, os.getuid(), grp_id)
os.chmod(self._fifo_path, 0o660)
self._fifo_fd = os.open(self._fifo_path,
os.O_RDONLY | os.O_NONBLOCK)