Change the ownership of files on container to the runner id

This commit is contained in:
Nicolas Setton
2019-02-01 15:05:23 -05:00
parent 90e7cf1b07
commit f987815443

View File

@@ -221,6 +221,10 @@ def run_program(request):
try:
subprocess.check_call(["lxc", "file", "push", "--recursive", tempd,
"safecontainer/workspace/sessions/"])
subprocess.check_call(["lxc", "exec", "safecontainer", "--",
"chown", "-R", "runner",
"/workspace/sessions/{}".format
(os.path.basename(tempd))])
subprocess.check_call(["lxc", "exec", "safecontainer", "--",
"chmod", "-R", "a+rx",
"/workspace/sessions/{}".format