Skip to content

Commit 4f589d8

Browse files
authored
load-task: ensure .bashrc is readable by the worker user (#725)
The uid outside docker might not match the worker user in the container, either due to namespaces or just not running as uid 1000, e.g. when using podman I'm getting a root-owned 0600 .bashrc, meaning I can't actually run exec-task.
1 parent f8c4bfb commit 4f589d8

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/taskgraph/docker.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -346,6 +346,7 @@ def load_task(task_id, remove=True, user=None):
346346

347347
if task_command:
348348
initfile = tempfile.NamedTemporaryFile("w+", delete=False)
349+
os.fchmod(initfile.fileno(), 0o644)
349350
initfile.write(
350351
dedent(
351352
f"""

0 commit comments

Comments
 (0)