title: No such file or directory error in Jenkins shell script that works well in another jobs
body: <p>I have four different but very similar jobs in the same Jenkins instance and ran with the same user, that have the same shell step definition. The shell step definition is like this:</p>
  <pre><code>#!/bin/sh
    echo $WORKSPACE
    cd $JENKINS_HOME/users/foo
    sh script.sh
  </code></pre>
  <p>When I execute the job, it throws the next error:</p>
  <blockquote>
  <p>cd: /var/lib/jenkins/users/foo: No such file or directory</p>
  <p>sh: script.sh: No such file or directory</p>
  </blockquote>
  <p>In the other jobs that I have the same command sequence in the shell step, it works well and the <em>script.sh</em> is executed.</p>
  <p>I have seen several posts and I have tried to change to <code>bin/bash</code>, execute the script directly with <code>source</code> or <code>./</code>, but none of the solutions worked.</p>