Skip to content

Commit 80cd7bc

Browse files
authored
Merge pull request #6073 from jk464/bugfix/5591
For "local-shell-script" runner, on readonly filesystems, don't attempt to run chmod +x on script_action.
2 parents d54abcf + 8b794cc commit 80cd7bc

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

CHANGELOG.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,9 @@ Fixed
4444
* Update importlib-metadata from 3.10.1 to 4.8.3 for py3.6 and to 4.10.1 for py3.8 (security). #6072
4545
Contributed by @jk464
4646

47+
* For "local-shell-script" runner, on readonly filesystems, don't attempt to run chmod +x on script_action. Fixes #5591
48+
Contributed by @jk464
49+
4750
Added
4851
~~~~~
4952
* Move `git clone` to `user_home/.st2packs` #5845

contrib/runners/local_runner/local_runner/base.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,10 @@ def _run(self, action):
116116
sanitized_args = action.get_sanitized_full_command_string()
117117

118118
# For consistency with the old Fabric based runner, make sure the file is executable
119-
if script_action:
119+
# Also check to ensure not Read-only file system
120+
if script_action and not bool(
121+
os.statvfs(self.entry_point).f_flag & os.ST_RDONLY
122+
):
120123
script_local_path_abs = self.entry_point
121124
args = "chmod +x %s ; %s" % (script_local_path_abs, args)
122125
sanitized_args = "chmod +x %s ; %s" % (

0 commit comments

Comments
 (0)