Use user home as work directory of executor

When we config non-root user as executor.user in zuul.conf,
we should switch to the user's home directory in order to avoid
"Permission deny" error, sometime we may launch zuul-executor
process in /root directory.

Change-Id: I20ddeace5822fa58235915d4629f3acd40e2a4b0
changes/32/516532/1
Rui Chen 5 years ago
parent 060352ccf0
commit ec7849d94f
  1. 1
      zuul/cmd/executor.py

@ -108,6 +108,7 @@ class Executor(zuul.cmd.ZuulApp):
os.setgroups(groups)
os.setgid(pw.pw_gid)
os.setuid(pw.pw_uid)
os.chdir(pw.pw_dir)
os.umask(0o022)
def main(self, daemon=True):

Loading…
Cancel
Save