jenkinsci / jenkinsci/durable-task-plugin

[JENKINS-40785] Cannot run shell step if control dir parent is not writable

Open
#370 2 comments 0 reactions 0 assignees View on GitHub
component:durable-task-plugin imported-jira-issue priority:major resolution:unresolved
Dominant language
Java
Stars
30
Forks
101
PR merge metrics
No merged PRs in 30d

Description

A major part of our build pipeline is that it needs to chdir around our deployment machines and rollout several components. We were using ws/dir steps in our pipeline script to chdir to our target locations before spawning sh() scripts, but after updating to durable-task 1.12 this no longer works.

The plugin attempts to create directories in unwritable locations.

I've looked at the code: https://github.com/jenkinsci/durable-task-plugin/blob/master/src/main/java/org/jenkinsci/plugins/durabletask/FileMonitoringTask.java and understand you don't want to write to files inside the workspace, fair enough I guess, but that's not a concern for us.

Is there a reason this can't either: a) use the regular tmpdir, or b) allow some kind of config for this?

The current workaround is to make a dir somewhere we know is writable, chdir to it, then have the spawned shell script chdir back out. And then chdir back out once the `sh()` step is finished.

---
Originally reported by jfunnell, imported from: Cannot run shell step if control dir parent is not writable


  • status: Open
  • priority: Major
  • component(s): durable-task-plugin
  • resolution: Unresolved
  • votes: 0
  • watchers: 3
  • imported: 2025-12-09

Raw content of original issue

A major part of our build pipeline is that it needs to chdir around our deployment machines and rollout several components. We were using ws/dir steps in our pipeline script to chdir to our target locations before spawning sh() scripts, but after updating to durable-task 1.12 this no longer works.
The plugin attempts to create directories in unwritable locations.
I've looked at the code: https://github.com/jenkinsci/durable-task-plugin/blob/master/src/main/java/org/jenkinsci/plugins/durabletask/FileMonitoringTask.java and understand you don't want to write to files inside the workspace, fair enough I guess, but that's not a concern for us.
Is there a reason this can't either: a) use the regular tmpdir, or b) allow some kind of config for this?
The current workaround is to make a dir somewhere we know is writable, chdir to it, then have the spawned shell script chdir back out. And then chdir back out once the `sh()` step is finished.

environment

```
Jenkins 2.36

durable-task-plugin 1.12
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.