From a4ac53b1826d96b463a781f8225cb1116c049271 Mon Sep 17 00:00:00 2001 From: Devashish Gaikwad Date: Thu, 8 Oct 2026 18:52:21 +0200 Subject: [PATCH] fix: modify worktree access rights #6392 --- CHANGELOG.rst | 1 + st2common/st2common/runners/base.py | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index dbd4b3f4b6..217b992c99 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -25,6 +25,7 @@ Fixed * Fix ``TypeError`` when displaying help for actions whose parameters have no ``description`` key. #6375 * Fix utf-8 encode before checking paramter max size #6352 * Fix stuck running workflow tasks #6398 (by @guzzijones12@gmail.com) +* Fix worktree access rights #6392 (by @DevashishX) Changed ~~~~~~~ diff --git a/st2common/st2common/runners/base.py b/st2common/st2common/runners/base.py index c0390f5563..50170daad3 100644 --- a/st2common/st2common/runners/base.py +++ b/st2common/st2common/runners/base.py @@ -382,8 +382,8 @@ def create_git_worktree(self, content_version): else: LOG.debug('Git worktree created in "%s"' % (worktree_path), extra=extra) - # Make sure system / action runner user can access that directory - args = ["chmod", "777", worktree_path] + # Make sure only system / action runner user can access that directory + args = ["chmod", "750", worktree_path] cmd = list2cmdline(args) run_command(cmd=cmd, shell=True)